emacs-android icon indicating copy to clipboard operation
emacs-android copied to clipboard

can't enter some characters

Open hobbes opened this issue 12 years ago • 27 comments

Hi,

I just installed your emacs port for android on an asus tf101 with CM9 (ics), thanks for that. The transformer comes with a hardware keyboard, mine is Belgian. The regular android terminal works fine for all characters.

emacs starts fine and seems to work fine, but the terminal somehow borks my hardware keyboard.

Regular ascii letters work fine, ctrl and alt also, but that's about it...

The number keys directly produce numbers, whereas they should need shift in the Belgian layout. With shift, they produce special non ascii characters: !@#$%^&*() in that order.

Most other punctuation signs on the keyboard do not work: keys on the right of numbers and letters (all rows) do not produce any output.

Don't hesitate to ask for more info, I would definitely like to see this work :-)

hobbes avatar Aug 09 '12 22:08 hobbes

Numbers: it's standard behavior on US or Polish keyboard. I didn't know that there are keyboards like this (I will change code to use data from input method).

Punctuation signs: they should work unless Ctrl or Alt is used to generate them on Belgian keyboards.

It's hard to debug a keyboard that you don't have. I even had troubles with my own Asus Transformer that for some reason refuses to produce events for some key combinations like Ctrl-Space.

zielmicha avatar Aug 09 '12 23:08 zielmicha

On Belgian layout (and several others), we have signs on the top row, and numbers need to be input with shift.

Punctuation signs are different on all layouts, so the input methot needs to be used for them too.

The standard android terminal works fine with my layout, so the problem is probably in one of your modifications... by the way, would it be possible to use your emacs in the standard terminal ?

Thanks

hobbes avatar Aug 10 '12 07:08 hobbes

Input method is used for punctuation signs already, so I'm surprised that they don't work for you.

Unfortunately I can't use input method for everything - Alt/AltGr character is used as Meta and (at least polish) methods doesn't emit any characters - I have to translate keycodes manually.

Yes it's possible, but all terminal emulator I've seen have no easy way of typing "Meta" and they don't support sequences like Ctrl-Space.

This should launch emacs from other terminal:

export termuser=$(whoami)
su -m
chown -R $termuser /data/data/com.zielm.emacs
exit
cd /data/data/com.zielm.emacs
/system/bin/sh init.sh

zielmicha avatar Aug 10 '12 08:08 zielmicha

Same issue with US bluetooth keyboard. Don't see characters `~!@#%^&*()_+{}[]| from bluetooth keyboard. Software Hacker Keyboard works fine. Thanks for this port.

wheineman avatar Aug 25 '12 22:08 wheineman

I installed android-emacs in a samsung galaxy tab 10.1. Have no trouble using android's screen keyboard or hacker's keyboard also on the screen. However, my kensington bluetooh keyboard presents several drawbacks: the keys on the diagonals to the right of -, p, l and < are dead only in emacs. the alt/option key doesn't work either. I tried changing the language of the tablet (it's Spanish by default), which makes those keys active, but deactivates ctrl, and alt, as well as the @ sign. I'd assign keys manually, but can't figure the way to access the init file.

coloquio avatar Sep 05 '12 17:09 coloquio

I experience the same problem with an Apple Bluetooth keyboard, but when I use the same keyboard with Android Terminal Emulator, all keys work fine. A clue?

akrito avatar Sep 06 '12 22:09 akrito

I have modified keyboard handling to support Alt-key sequences. If think there is no clean way of handling them, because in some languages Alt is used as modifier key for producing accents.

zielmicha avatar Sep 07 '12 13:09 zielmicha

These issues seem really inconsistent. On Samsung Galaxy Note 10.1 the native keyboard works fine for all (most?) punctuation. The Hacker keyboard fails on some (e.g. *). My hardware bluetooth fails on others (e.g. ".").

All keyboards seem to work fine in other applications.

SorraTheOrc avatar Sep 09 '12 20:09 SorraTheOrc

Thanks for the update. In fact, now the alt-key works properly but the ctrl key is dead in my kensington bluetooth keyboard. Sad because every other key is working. I also tried to assign ctrl to other keys from the preferences menu, but it didn't work for me.

coloquio avatar Sep 16 '12 17:09 coloquio

+1 for this bug on a Asus Transformer Prime Infinity (TF700) with hardware UK keyboard. No modifications from new running Jellybean. None of the punctuation/symbol keys down the right hand side of the keyboard work: -_+={}[]:;@'#~<>,./? Unfortunately trying to program in C++ is going to be a bit tricky. :)

BTW, these keys all work in Terminal Emulator and Terminal IDE

vicdavery avatar Nov 06 '12 09:11 vicdavery

I'm going to get TF700 this week, so I will investigate.

Micha³ Zieliñski 6 lis 2012 10:42, "vicdavery" [email protected] napisa³(a):

+1 for this bug on a Asus Transformer Prime Infinity (TF700) with hardware UK keyboard. No modifications from new running Jellybean. None of the punctuation/symbol keys down the right hand side of the keyboard work: -_+={}[]:;@'#~<>,./? Unfortunately trying to program in C++ is going to be a bit tricky. :)

Reply to this email directly or view it on GitHubhttps://github.com/zielmicha/emacs-android/issues/1#issuecomment-10104338.

zielmicha avatar Nov 06 '12 14:11 zielmicha

Nice one, thanks for responding. I really like the TF700, a great little unit.

Michał Zieliński [email protected] wrote:

I'm going to get TF700 this week, so I will investigate.

Micha³ Zieliñski 6 lis 2012 10:42, "vicdavery" [email protected] napisa³(a):

+1 for this bug on a Asus Transformer Prime Infinity (TF700) with hardware UK keyboard. No modifications from new running Jellybean. None of the punctuation/symbol keys down the right hand side of the keyboard work: -_+={}[]:;@'#~<>,./? Unfortunately trying to program in C++ is going to be a bit tricky. :)

Reply to this email directly or view it on GitHubhttps://github.com/zielmicha/emacs-android/issues/1#issuecomment-10104338.

— Reply to this email directly or view it on GitHub.

vicdavery avatar Nov 06 '12 18:11 vicdavery

Any progress with the tf700 keyboard? It would be very useful for me -- emacs is great to have, but it is a little bit frustrating not to be able to really use it.

ricardodg avatar Nov 12 '12 15:11 ricardodg

Do you want new device bugs, or should we just pile on here? Just picked up an Asus TF300T with keyboard(+battery) dock on woot, and the dock-keyboard fails to generate anything for the punctuation keys. (Letters are fine - ^x^s and ^x^c are also fine, shift-numbers are fine, it's just actual punctuation keys: .,/;'`[]-= get no reaction at all - in emacs itself, or if I ^x^c out of it, from the shell that's left behind...)

eichin avatar Nov 28 '12 06:11 eichin

A possible workaround for hardware keyboards (bluetooth, usb...), from a user review of this Emacs for Android app on Google Play (September 8, 2012 - Version 1.0.1):

The keyboard issues others have mentioned disappear when I use External Keyboard Helper Pro. Non-alphanumeric keys, CTRL, ALT and function keys all seem to be fine (perixx PERIBOARD-804).

juan-g avatar Dec 10 '12 22:12 juan-g

Nice! I just tried "External Keyboard Helper Pro" on the Asus Transformer TF300T mentioned above, and the punctuation all works. I don't know if that leads to anything useful towards fixing it from within Emacs.app, but it means I can start using it and looking into more interesting problems :-)

eichin avatar Dec 11 '12 05:12 eichin

Same problem occurs with the TF201 en-US keyboard. Any luck debugging this?

tigerhawkvok avatar Jan 07 '13 00:01 tigerhawkvok

Does the workaround (External Keyboard Helper Pro app) fix it for you?

juan-g avatar Jan 07 '13 02:01 juan-g

it does, but I was mostly posting for error-tracking edification ;-)

tigerhawkvok avatar Jan 07 '13 04:01 tigerhawkvok

tigerhawkvok, in the user reviews (Google Play) there is one yesterday also with the TF201, saying "I'd love to see the ability to put in your own startup file!" Maybe it's your comment. In this case, I tested adding an init file, an it works. It's:

/sdcard/emacs/.emacs

juan-g avatar Jan 07 '13 23:01 juan-g

I've only tried the demo of External Keyboard Helper Pro, but it doesn't fix the problem for me with a TF700T I'm afraid. Is it only the full version that works? The blurb for the demo said it just replaced the space bar with other characters.

BTW, the full version seems to have disappeared from the play store now too. :(

On Mon, Jan 7, 2013 at 11:27 PM, juan-g [email protected] wrote:

tigerhawkvok, in the user reviews (Google Play) there is one yesterday also with the TF201, saying "I'd love to see the ability to put in your own startup file!". Maybe it's your comment. In this case, I tested adding an init file, an it works. It's:

/sdcard/emacs/.emacs

— Reply to this email directly or view it on GitHubhttps://github.com/zielmicha/emacs-android/issues/1#issuecomment-11977423.

vicdavery avatar Jan 08 '13 08:01 vicdavery

same here, the External Keyboard helper didn't work w/ kensington bluethooth keyboard on a Galaxy 10.1 tablet

however, I was able to introduce punctuation signs from the external keyboard for a minute or so, while the keyboard was bluetooth connected and the system had not recognized it; I've tried unsuccessfully to disable all tablet's input modes and see if plain bluetooth connection fixes the issue.

coloquio avatar Jan 09 '13 00:01 coloquio

BTW, the full version seems to have disappeared from the play store now too. :(

It seems the Pro version (External Keyboard Helper Pro) is again available.

They say: "It does not automatically switch Input Method. It only shows the dialog and you will have to choose Input Method manually. This is an intentional limitation built into Android by Google. No app is allowed to change Input Method without user interaction (unless the app is a system app)."

And, about the Demo version, they say: "Everything works just like in the Pro version except for the Space button which prints a message that this is a demo version."

juan-g avatar Jan 09 '13 09:01 juan-g

These guys here http://code.google.com/p/connectbot/issues/detail?id=369 have been discussing for months the same issue of this thread --i.e. dead-keys in external keyboards for android devices. From comment 73 on some different approaches provide solutions for the mapping of dead keys, one of them remapping from busybox (comment 79) --don't know if the terminal emulator in android-emacs allows doing this. I wonder if some of these approaches would be useful to get the ctrl key working in emacs. My hunch is that the problem is on the android-emacs end because it somehow overrides interface with the native system key-mapping.

coloquio avatar Jan 11 '13 19:01 coloquio

A year later. On both a Samsung Galaxy S4 and a Nexus 7 tablet, USB keyboards had not worked with punctuation characters, on Emacs. Having now installed External Keyboard Helper Pro, at least the "." key now works; however, it is necessary to manually change the input method as mentioned above. I think there may be other glitches with Alt-modified characters. For now I am pleased to find this thread, and that some solutions have been found. Hooray!!!

One is curious what could be the underlying issue. Perhaps something unique in the keyboard mapping of Emacs? Would the bash shell make a difference?

I can type on my tablet and phone with a physical keyboard.

lngndvs avatar Dec 27 '13 20:12 lngndvs

I was trying to type a * (as in shift 8) for a heading in org-mode, and the only way I could get it to work is by using Fn and the numeric pad's * symbol.

I'm using the on-screen hackers keyboard with US layout.

ivanperez-keera avatar Sep 26 '14 12:09 ivanperez-keera

I'm using an external bluetooth keyboard but only few keys are working within emacs, Ctrl Alt Shift 0-9 a-z space, any other key doesn't work (no symbols... no accent).

I've tried External Keyboard Helper Demo, itself does work, it auto detect the layout correctly and the debug option show the keyboard id and scan codes for each key correctly, but it doesn't work within emacs.

Any suggestion?

xenogenesi avatar Jul 20 '15 13:07 xenogenesi