For Emacs, long journey for using CTRL key in Android - android

I need some help with Emacs. I'm running the Ubuntu in Froyo (Android 2.2) and connect with Android VNC Viewer.
But in Android VNC Viewer, it is hard to use CTRL, ALT, left mouse, and right mouse buttons
so I made several experiments.
I tried to modify /system/usr/keylayout/eve_qwerty.kl (since my phone is gw620-eve), but I can't remap the volume button to CTRL key, though I can remap the volume button to ALT key
key 114 VOLUME_DOWN WAKE -> key 114 ALT_LEFT
I also tried changing eve_qwerty.kcm.bin file as well
Is there any special name for CTRL as like ALT_LEFT? I can't remap with CTRL_LEFT or CONTROL?
Could somebody let me know ASCII code of CTRL? Or could somebody let me know how to apply this (http://developer.android.com/reference/android/view/KeyEvent.html) useful reference to my work?

There is no support for the CTRL key until Android 3.0.

A related question at Stack Overflow is Capture all Ctrl-? under Android.
For what you were trying to do on Android, there are External Keyboard Helper Pro app for physical keyboards, or the virtual Hacker's Keyboard with Ctrl, etc. keys. A resistive or capacitive stylus could be useful with the full virtual keyboard in portrait mode if using a phone and the keys are small.
See also the EmacsWiki section Emacs on Android, with a recent first Emacs port to Android, etc.

Related

meta keyboard key in Windows 10

I use a Mac at office and a Windows OS at home, as it is common I am really getting confused with the use of two different Keymap shortcuts.
So I am trying to change my windows keyboard so to mimick an Ios keyboard.
Outside the specific use of a software as hotkeysto change the keyboard map, my problem is that the windows key is not recognized as meta.
According to different posts and the intelliJ blog/issue, I can make windows key as meta (mac os) adding in File idea.proprieties the string :
keymap.windows.as.meta=true
Well does not work, when I put this string in IntelliJ and restart AS, meta is not recognized in fact if I try to change some shortcuts windows+ some letter, the IDE recognizes only that I pressed the hardware button `Windows, making impossible to use Mac OS keywords really useful and simple as Copy, Paste, Cut.

How can I write "#" (at) in android emulator?

If I try to use altgr+v (#) in an android emulator's editText, I cannot write the "#" sign.
The altgr is the 2 finger gesture (zoom) by default.
Any other shortcuts or some solution for this?
As it can be seen and pointed out in below screen
Take your mouse and click at the pointed area you will find new keyboard option and done
You can use your hardware keyboard that is attached with your computer or laptop. To use your hardware keyboard follow below steps
Open AVD manager
Go to edit option of your desire virtual device
Select Show Advance setting button
At the bottom you will find enable keyboard option mark that option check
It's still open bug in Google issue tracker from 2017 🤷‍♂️ https://issuetracker.google.com/issues/37142228
This is an old question but still a valid one, since i suffered from that too recently.
Is not possible to type "#" using a keyboard with a language that requires to use Option+Q or Option+2 in Mac, or AltGr+Q in windows, the emulator does not accept the use of Option nor AltGr keys
the solution is to change the language of keyboard to english ABC so the # is accesible with Shift+2, in other languages, the number 2 has (") but in english ABC the number 2 has the (#) when you use shift.
Go to settings and change the configuration of your keyboard, in Mac you can just click in the keyboard icon showed in the top bar

Simulate the winKey press event in android

I'm using a bluetooth keyboard with an android tablet and i've found that there's some shortcut avaible from a qwerty keyboard. I want to generate some of them from the code. I'm able to trigger the majority of all the key combination but I'm not able to trigger a winKey (The windows logo key on a qwerty). I've basically try every KEY CODE from android and non of them want to work.
If any one as a little hint on that subject that would be appreciated.

Simulating arrow key presses in android

I am currently working on an app that simulates the d-pad (up, down, left, and right). The problem is that I can't figure out how to send those key presses to other applications.
Currently, I am using Instrumentation and it works perfectly fine in the activity of my app.
Here is the snippet of the arrow key left code:
new Thread(new Runnable() {
#Override
public void run() {
new Instrumentation().sendKeyDownUpSync(KeyEvent.KEYCODE_DPAD_LEFT);
}
}).start();
The problem with this implementation is that due to an android security feature, I cannot send key presses to other applications.
After searching up different ways to injecting key presses, I came across this article. However, after trying the example code, it doesn't seem to work. I poked around and found out that android doesn't seem to have an input device for the keyboard. When I scan for different input devices, I get stuff such as orientation sensor and etc. Here is a pic of all the input devices on my phone (T-959 Galaxy S).
As you can see, none of these devices is a keyboard. I have a feeling that this is because my phone does not have a physical keyboard. (cypress is the capacitive keys, aries is the volume buttons, and mxt224 is the touchscreen controller)
After a bit more of research, I found that the accessibility api in android has limit capabilities for injecting events, but those are only very basic things such as switching view focus and etc (AccessibilityNodeInfo). However, I have a feeling that I might be able to extend it to support arrow key presses.
So currently, I am very confused on where to go. Has anyone ever done anything like this before? It seems that the simple injection of arrow keys (nothing else) is very frustrating due to the security features in Android. All suggestions are welcomed.
EDIT: I might not have been very clear, but I am fine with building this for rooted phones only. Only requirement is that this app has to run standalone on the phone without being hooked up to any external keyboards via otg or the computer via adb.
I wanted to simulate DPAD key press events few days back and I did find a solution which has its own limitation.
Arrow key press can be simulated using adb commandinput keyevent <keycode>.
So if you want to simulate a DPAD LEFT key press then use the adb commandadb input keyevent 21.
To reuse this bit of code and scale it forward, I created a standalone swing application where i select the device to which i need to send the key events and I can use the existing keyboard of my computer to type in the keys.[I map the keyboard key codes to android key codes].
I am further scaling the application by including remote and game pad buttons, once done, i'll upload the project on git.
Hope this helps.
IF you intention is to create an application that works on non rooted phones perhaps your best bet is to implement a new InputMethod using http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html

How to input ampersand(&), asterisk(*) and other characters in android 2.1 emulator?

I'm trying to add a new account in android 2.1 emulator. When I'm entering my password, I found it's impossible to input some symbols, such as #,$,&,*, except #. For example, while I press shift+7, only 7 is shown in the password textview.
Any suggestion?
Entering these special characters into the emulator works correctly for me (Linux, US International keyboard layout). Which platform are you using? Have you tried the emulator's on-screen keyboard?
Have you tried toggling the input method from alpha to numeric/symbol?
I had the same problem. On your phone, you have to ensure that the settings for the keyboard/locale match your computer settings. Find the Settings icon and go from there.
I couldn't enter special characters with the pop-up soft keyboard, the PC's hardware keyboard, or the gray keyboard to the right of the emulator window on 2.3.3 emulator (API10).
However, when I tried on the 4.0.3 (API15) emulator, the PC's hardware keyboard entered symbols without a problem. The gray keyboard to the right of the window would just repeat keys if I held them down to get to the symbols. The soft keyboard wasn't available on my configuration and I didn't spend any time trying to configure it to do so.

Categories

Resources