Dedicated underscore key (prev: Option to switch to the email style keyboard)

When typing an email address in Safari/Firefox the keyboard changes its layout to include a dedicated underscore key. It’s not possible to select this from the keyboard settings, however, I would really like to be able to use this layout in Codea since I use underscores a lot and typing them in the regular keyboard is cumbersome. I imagine this keyboard is available in the iPad SDK somehow since it is used by Firefox; therefore I suggest Codea has an option to use the email keyboard instead of the regular keyboard.

@alteous This might not be the greatest fix, but if you go to settings, keyboard, text replacement , you can set a sequence of keys to change to an underscore. For instance, you can have 2 periods change to an underscore. If you key 2 periods and a space, the 2 periods change to an underscore. The only problem is you have to key 2 periods, a space, then the backspace key to get rid of the space, then whatever else you want to key. Give it a try, you might get used to it.

you could always make your own software keyboard

@dave1707, I gave your suggestion a try. It’s a very neat trick but unfortunately has a fatal flaw: the space bar must be pressed to activate the substitution. This means the sequence to type a_b is <a> <,> <,> <SPC> <BS> <b> which isn’t much of an improvement!

@se24vad, I would if I had the means to do so. If I’m not mistaken, it’s not possible to write software for the iPad without a Mac. :frowning:

If changing the keyboard is not an option, may I suggest instead a dedicated underscore key to replace the find/replace key on the hotbar? The find/replace key could find a new home, perhaps bundled with the undo key.

Maybe TLL can add the underscore to the ±*/ key with the other math symbols.

@alteous I wonder if you go to settings, keyboard, add new keyboard, if you can find a keyboard with the underscore. Or have you thought about using an external keyboard.

EDIT: One thing I just noticed on my iPad Pro, the underscore key is available. It shares the same key with the dash key. All I have to do is touch the dash key and swipe up to get an underscore.

@alteous what I would do is just change the keyboard type in xCode with OBJ-C

@dave1707 I have an iPad 2. I had another look at the keyboard selection trying different variants of English layouts but no luck. Neither the dash key (this one: -, right?) nor any other keys I tried have underscore when held. Buying an external keyboard might be an option. They’re quite expensive though so I’m reluctant to try. :slight_smile:

@CamelCoder I don’t have access to XCode, and from a quick glance at the Apple SDK docs I’m uncertain whether there is a way of changing the keyboard type globally. It’s trivial to do so at the application level though (https://developer.apple.com/documentation/uikit/uikeyboardtype).

Maybe TLL can add the underscore to the ±*/ key with the other math symbols.

Beggars can’t be choosers… but I must say for this to be useful feature the underscore key would need to be in a prominent place.

@alteous That’s one of the reasons I never used the underscore key for any coding I do. Instead of the underscore, I started to capitalize letters at the beginning of multiword names.

I decided to invest in an external/hardware keyboard. I’m impressed with how well Codea works with it. In particular I have found the tab-to-autocomplete feature, Cmd+F for find, and Cmd+R for run to be really handy features. Best of all, I have my beloved underscore key back! :smiley: It would still be useful to have a software fallback though for when the external keyboard inevitably runs out of battery.

@alteous interesting suggestion on using the email keyboard by default. I’ll keep it in mind to try out. Just in case you don’t know you can quickly swipe-down on the iPad Pro and Regular software keyboards to get underscore (though on regular iPad you need to hit the .?123 key then swipe down on the ampersand (&) to get it.

Just in case you don’t know you can quickly swipe-down on the iPad Pro and Regular software keyboards to get underscore (though on regular iPad you need to hit the .?123 key then swipe down on the ampersand (&) to get it.

Not sure if I fully understand what you mean. I gave swiping down on the ‘&’ key on the UK and US layout but neither yielded an underscore. :frowning:

To clarify: I’m suggesting an option to switch to the email style keyboard but not to make this the default. I imagine this option would be configurable in the same place as the font size and theme is configured.

@alteous I tried the swipe down on the & key and I got the _ . This was on my iPad Air. You have to tap the .?123 key to get the numeric keys showing, then press and hold the & key then swipe down.

@alteous like this https://imgur.com/a/UHE4TJ7