I noticed that the Khadas remote has a “mouse mode” toggle button. Based on my understanding, mouse mode is not something supported by Android by default. Is there a way to enable/disable mouse mode programmatically?
I tried this piece of code to simulate various button on the dpad, but can’t find the right key value for mouse toggle.
Instrumentation instrumentation = new Instrumentation(); instrumentation.sendKeyDownUpSync(key);
April 5, 2017, 3:47pm
Following are the keycode and keyvalue mapout, which locate at
0x5c is for mouse button.
Regarding your question, i’m not quite understand what do you mean of:
Kindly explain with more information.
I don’t understand, seems like 0x5c maps to KEYCODE_PAGE_UP
I need to enable and disable mouse mode (the mode where you can see the mouse pointer) via the apk (app) level during runtime. I can’t tell the users to modify the remote.conf file.
April 5, 2017, 4:25pm
0x5c is the keyvalue read from linux, and the corresponding keycode for Android is 63
Regarding the instructions to enable/disable mouse mode,
@Terry will reply you with the details. (It’s night here in Shenzhen China at the moment, you might should wait a few hours)
April 6, 2017, 2:36am
The IR already can enable/disable the mouse mode .
Can you tell me why need to enable/disable the mouse mode via app ?
July 7, 2017, 11:18pm
as i am using Libreelec i dont need the enable/disable mouse mode. Is it possible to deactivate this function, so i can use the key for another function within Libreelec?
July 8, 2017, 6:13am
Yes, can be remap any keycode/function by modifying the source code, and also can be work as 2nd mode:
1st mode: all buttons as normal key-codes/functions
2nd mode: all buttons as secondary key codes/functions
July 8, 2017, 6:40am
Can you explain what i have to do for that?