External keyboard

I have experimented a bit with my normal external Apple keyboard hooked up to the iPad.
There is so much to gain from using a normal keyboard, so I ended up ordering a Logitech keyboard for that sole purpase.
Should show up in a couple of days :slight_smile:

The Codea function keys goes to the bottom of the screen which is nice because that releases some screen area for the coding.
But is there a way to grab some of the functions by a keyboard combination ? Especially the run function and cursor retrival to the screen would be nice.
Maybe some one have a list of shortcuts ?

Re Peter

Yeah, I agree. F5 to run would be nice. +1!

Control = Ctrl
Command = Cmd
alt/option = alt/opt
Arrow left/right/up/down = A l/r/u/d

Cmd-A = copy everything
Cmd-Z = Undo (only once)
Cmd-X = Cut
Cmd-C = Copy
Cmd-V = Paste
Cmd-l/r/u/d = Move cursor to the l/r/u/d
Ctrl-a = move to beggining of line
Ctrl-e = move to end of line
Ctrl-i = tab
Ctrl-j/m = return or enter/return or enter
Ctrl-b = back
opt-anychar = special character e.g. opt-w = ?
(shift-opt in my case) alt-anychar = special character e.g. alt-w = „

so yeah in my case i have a logitech ultrathin keyboard cover so i have the fn key which gives me more functions based on… its a but hard to explain but yeah thats all i know (and a few i didnt)

.@macflyerdk I really wish we could add this, unfortunately iOS does not allow us to know what keyboard keys were pressed — only what characters were received as input.

Which Logitech keyboard did you order? Let us know if it’s good.

my addition may be limited to the logitech ultrathin… but it may not be

I dont use my apple keyboard for the same reason (missing keys), although it would be much faster. Simeon, you don’t have access to the type of keys used, but you could add 1 line of keys at the bottom of the display, when we use an external keyboard. That would be a better compromize.

I ordered the Logitech Ultrathin keyboard, promised to arrive 27. Nowember.
I could just have used my stadard Apple keyboard, but then the iPad has no stand and needs a hand to hold it (sofa coding)
The Logitech UT has a holding clip which should secure the iPad according to Logitech and sattisfied customers. Hope it is so.
As for the on screen keyboard I have allready noticed that it shrinks to one line at the screen button showing the function keys only. It is a good solution and can make it for the missing keyboard shortcuts.
Thanks @Dalorbi for the shortcut list. I may add that the primary benefit is the arrow keys to navigate around the screen. Also I found that shift+arrow is a good way to highlight text for further copy-paste-cut opperations.
I will be back with an update when I have hands on :wink:
Re Peter

It may be time to add that I find that Codea is the most fullfilling app I have ever used.
Coding is so much fun and satisfying these days and I can’t imagine why this is not an Apple standard app. Nice work @Simeon :slight_smile: Looking foreward to 1.5 an even better experience it sounds like.

I’m using a Targus bluetooth wireless keyboard. Something that captures some of the basics, like function keys, would still work though.

+1 for the keyboard shortcuts or somekind of shortcut bar at the bottom of the screen!

I’d recommend anyone who is serious about using Codea to get a decent BlueTooth keyboard it makes a WORLD of difference!

Having used the UltraThin keyboard from LogiTech the last 2 days, I can recommend this.

iPad and keyboard makes a nice sandwich when not in use and mounting the iPad in the slot makes a very stable setup much like a small laptop computer.

Most of the functions for navigating are available directly on the keyboard and the one line function keys on the iPad makes up for the rest close to where your hands are anyway.

Only caveat found so far is that the screen is very close to the hands on the keyboard, so in fast typing it is easy to slightly hit the screen, moving the insert point to another place. Then typing goes on from where the touch occurs and making a mess.
But when you know it is just a matter of taking care of your movements.

One other thing is that touching the screen is necessary to retrieve the cursor to the screen and moving in between tabs.

Re Peter

@Simeon, Reopening this for clarity: Back in Nov 2012 you posted that you only know what keys iOS forwarded. I’m using an external keyboard, and I’d like to get a key for the arrows. What I don’t seem to see is any arrow key being sent to my Codea app when I use function keyboard(key) print( string.byte(key)) end

Strangely, Tab (9) and return (10) give my bytes, but delete doesn’t…nor does cursor keys. I know we have constants for the RETURN and TAB keys; can we get some constants for the arrow keys, too?

BTW: I use Linux as an external keyboard. I used this:

It takes less space on my desk since pc keyboard is already there anyway :slight_smile:

I am reviving a quite old thread but I wanted to know if there was some update. I also need to catch the arrow keys. Any update since April 2013 ?

Oh and one more question, when we use the external keyboard there is still a line on the screen with undo/redo. Any chance we can hide that ?

@dlpnet catching the arrow keys is tricky as there is no direct way to do it. The way to go for that would be to implement them as keyboard shortcuts in uikit.

The keyboard accessory group/bar is something I can look at disabling by default. Do you think anyone would ever want it on in a Codea app?

@Simeon I use the keyboard for some of my classroom apps. It might be a hassle to add the feature, but I would like it if I had the choice to turn it on or off.

There are some rare situations where an Apple keyboard or a bluetooth keyboard doesn’t have the button I need. So long pressing the hide keyboard in the keyboard accessory group/bar on the right will show the software keyboard. For example; emoji. While using a connected keyboard, the only way to use emoji (with out turning of the hardware keyboard) is to the use the software keyboard.

@exomut I didn’t realise that about emoji. I guess Apple’s first-party iPad keyboards include the “Globe” key to get there, but other keyboards like Mac ones might not

@Simeon I looked into it a little more and it looks like keyboards without the globe, such as mine, can emulate the globe button by using ctrl+space . So, I guess the bar might not be needed. One other benefit of the bar is spelling suggestions, but those don’t show up in Codea when using the keyboard in a project. I am starting to think the bar wouldn’t be missed. That is just my opinion though.

Well, at least we are 2 :slight_smile: