gujjwal00 / avnc

VNC Client for Android
GNU General Public License v3.0
659 stars 59 forks source link

Can't send super/windows key hotkeys when using hardware keyboard #141

Closed sudomain closed 1 year ago

sudomain commented 1 year ago

Hello,

I'm trying to send super + key hotkeys to my server using hardware keyboards, but these hotkeys aren't going through. Ctrl, Alt, Shift modifiers all work, but not super for some reason. I've tried a few things:

  1. 2 different bluetooth keyboards and an usb keyboard using a usb-c adapter.
  2. I use Key Mapper and disabled it entirely
  3. I checked Ctrl and Alt are working in my sxhkdrc config:
    ctrl + a
    termux-notification -c "Ctrl a test"
    super + q
    termux-notification -c "super q test"

With this config, both hotkeys work using the virtual keys, but only Ctrl + a works with a hardware keyboard. I'm wondering if it's just Android intercepting everything starting with super for its annoying keyboard shortcuts?

Edit: It turns out not to work for MultiVNC either

Edit #2: I spoke too soon: xev -event keyboard reports that it can see the event:

KeyPress event, serial 28, synthetic NO, window 0x2600001,
    root 0x51b, subw 0x0, time 572006702, (112,130), root:(677,740),
    state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2600001,
    root 0x51b, subw 0x0, time 572006706, (112,130), root:(677,740),
    state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Interestingly the KeyPress event of the super key is reported only after it is released (unlike the other modifier keys which have KeyPress occur instantly when the key is pressed). Additionally, if another key is pressed, for instance "q", then "q" is not reported

gujjwal00 commented 1 year ago

Please go to Settings => Tools => Key test in AVNC, and record different shortcuts involving Super key. Then, paste the event logs here.

sudomain commented 1 year ago

Thank you for the reply. The following is a log of me holding the following keys for approximately 3 seconds and then releasing before proceeding to the next key:

  1. left Ctrl
  2. left Super
  3. right Ctrl
  4. right Super

None of the keys were pressed at the same time:

<details>
<summary>Key test</summary>
<p>

```python
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=0, eventTime=679239609, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x88, repeatCount=1, eventTime=679240010, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=2, eventTime=679240061, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=3, eventTime=679240112, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=4, eventTime=679240163, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=5, eventTime=679240214, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=6, eventTime=679240265, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=7, eventTime=679240316, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=8, eventTime=679240366, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=9, eventTime=679240417, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=10, eventTime=679240469, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=11, eventTime=679240520, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=12, eventTime=679240572, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=13, eventTime=679240624, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=14, eventTime=679240676, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=15, eventTime=679240726, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=16, eventTime=679240777, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=17, eventTime=679240828, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=18, eventTime=679240879, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=19, eventTime=679240930, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=20, eventTime=679240981, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=21, eventTime=679241033, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=22, eventTime=679241085, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=23, eventTime=679241136, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=24, eventTime=679241188, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=25, eventTime=679241239, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=26, eventTime=679241290, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=27, eventTime=679241341, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=28, eventTime=679241393, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=29, eventTime=679241445, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=30, eventTime=679241497, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=31, eventTime=679241549, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=32, eventTime=679241600, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=33, eventTime=679241652, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=34, eventTime=679241704, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=35, eventTime=679241757, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=36, eventTime=679241808, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=37, eventTime=679241861, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=38, eventTime=679241913, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=39, eventTime=679241964, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=40, eventTime=679242015, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=41, eventTime=679242067, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=42, eventTime=679242119, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=43, eventTime=679242173, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=44, eventTime=679242225, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=45, eventTime=679242277, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=46, eventTime=679242328, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=META_CTRL_ON|META_CTRL_LEFT_ON, flags=0x8, repeatCount=47, eventTime=679242380, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_UP, keyCode=KEYCODE_CTRL_LEFT, scanCode=29, metaState=0, flags=0x8, repeatCount=0, eventTime=679242392, downTime=679239609, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_META_LEFT, scanCode=125, metaState=0, flags=0x0, repeatCount=0, eventTime=679247092, downTime=679247092, deviceId=195, source=0x0, displayId=0 }
KeyEvent { action=ACTION_UP, keyCode=KEYCODE_META_LEFT, scanCode=125, metaState=0, flags=0x0, repeatCount=0, eventTime=679247092, downTime=679247092, deviceId=195, source=0x0, displayId=0 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=0, eventTime=679248091, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x88, repeatCount=1, eventTime=679248495, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=2, eventTime=679248546, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=3, eventTime=679248598, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=4, eventTime=679248650, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=5, eventTime=679248700, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=6, eventTime=679248752, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=7, eventTime=679248803, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=8, eventTime=679248855, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=9, eventTime=679248906, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=10, eventTime=679248958, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=11, eventTime=679249008, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=12, eventTime=679249059, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=13, eventTime=679249112, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=14, eventTime=679249164, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=15, eventTime=679249216, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=16, eventTime=679249268, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=17, eventTime=679249320, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=18, eventTime=679249372, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=19, eventTime=679249423, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=20, eventTime=679249475, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=21, eventTime=679249527, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=22, eventTime=679249579, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=23, eventTime=679249630, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=24, eventTime=679249682, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=25, eventTime=679249734, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=26, eventTime=679249786, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=27, eventTime=679249837, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=28, eventTime=679249889, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=29, eventTime=679249940, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=30, eventTime=679249991, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=31, eventTime=679250042, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=32, eventTime=679250093, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=33, eventTime=679250144, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=34, eventTime=679250194, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=35, eventTime=679250245, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=36, eventTime=679250297, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=37, eventTime=679250348, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=38, eventTime=679250398, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=39, eventTime=679250449, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=40, eventTime=679250501, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=41, eventTime=679250552, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=42, eventTime=679250603, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=43, eventTime=679250654, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=44, eventTime=679250706, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=45, eventTime=679250757, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=46, eventTime=679250809, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=47, eventTime=679250860, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=48, eventTime=679250912, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=49, eventTime=679250963, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=50, eventTime=679251015, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=51, eventTime=679251066, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=META_CTRL_ON|META_CTRL_RIGHT_ON, flags=0x8, repeatCount=52, eventTime=679251118, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }
KeyEvent { action=ACTION_UP, keyCode=KEYCODE_CTRL_RIGHT, scanCode=97, metaState=0, flags=0x8, repeatCount=0, eventTime=679251162, downTime=679248091, deviceId=-1, source=0x101, displayId=-1 }

Preview text: 


Unlike the Ctrls, the left super only had 2 key events- up and down, while the right super doesn't appear at all.

Next I tried a sequence of sequence of:
1. Left super + q
2. Right super + q

and this is the log:
Key test

```python KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_META_LEFT, scanCode=125, metaState=0, flags=0x0, repeatCount=0, eventTime=679834811, downTime=679834811, deviceId=205, source=0x0, displayId=0 } KeyEvent { action=ACTION_UP, keyCode=KEYCODE_META_LEFT, scanCode=125, metaState=0, flags=0x0, repeatCount=0, eventTime=679834811, downTime=679834811, deviceId=205, source=0x0, displayId=0 } Preview text: ```



So the left super is detected but any keys pressed at the same time are ignored, while the right supre does not get detected.

left and right `super + q` hotkeys can be detected in Key Mapper.
gujjwal00 commented 1 year ago

left and right super + q hotkeys can be detected in Key Mapper.

Is this an Android app?

sudomain commented 1 year ago

Yes - https://github.com/keymapperorg/KeyMapper

gujjwal00 commented 1 year ago

Try mapping the right super to left super (or any other key code) in Key Mapper, and check if something is detected in AVNC key test.

Key Mapper seems to use accessibility service to detect key events, so it might not be affected.

gujjwal00 commented 1 year ago

Closing this. If the OS is not reporting events correctly, there is nothing AVNC can do. You could try one of the key mappings in Input settings.

sudomain commented 1 year ago

Sorry for the late reply. I ended up mapping left super to left super and right super to right super in Key Mapper when AVNC is in the foreground. This fixed the issue and allows all Super + * hotkeys. You're probably right about the accessibility service. Thanks!

Key test

```python KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_META_LEFT, scanCode=0, metaState=META_META_ON|META_META_LEFT_ON, flags=0x0, repeatCount=0, eventTime=71921084, downTime=71921084, deviceId=0, source=0x0, displayId=0 } KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_A, scanCode=30, metaState=META_META_ON|META_META_LEFT_ON, flags=0x0, repeatCount=0, eventTime=71921479, downTime=71921479, deviceId=20, source=0x0, displayId=0 } KeyEvent { action=ACTION_UP, keyCode=KEYCODE_A, scanCode=30, metaState=META_META_ON|META_META_LEFT_ON, flags=0x0, repeatCount=0, eventTime=71921629, downTime=71921629, deviceId=20, source=0x0, displayId=0 } KeyEvent { action=ACTION_UP, keyCode=KEYCODE_META_LEFT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=71921757, downTime=71921757, deviceId=0, source=0x0, displayId=0 } KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_META_LEFT, scanCode=0, metaState=META_META_ON|META_META_LEFT_ON, flags=0x0, repeatCount=0, eventTime=71922149, downTime=71922149, deviceId=0, source=0x0, displayId=0 } KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_A, scanCode=30, metaState=META_META_ON|META_META_LEFT_ON, flags=0x0, repeatCount=0, eventTime=71922590, downTime=71922590, deviceId=20, source=0x0, displayId=0 } KeyEvent { action=ACTION_UP, keyCode=KEYCODE_A, scanCode=30, metaState=META_META_ON|META_META_LEFT_ON, flags=0x0, repeatCount=0, eventTime=71922711, downTime=71922711, deviceId=20, source=0x0, displayId=0 } KeyEvent { action=ACTION_UP, keyCode=KEYCODE_META_LEFT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=71922876, downTime=71922876, deviceId=0, source=0x0, displayId=0 } KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_META_LEFT, scanCode=0, metaState=META_META_ON|META_META_LEFT_ON, flags=0x0, repeatCount=0, eventTime=71923213, downTime=71923213, deviceId=0, source=0x0, displayId=0 } KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_A, scanCode=30, metaState=META_META_ON|META_META_LEFT_ON, flags=0x0, repeatCount=0, eventTime=71923621, downTime=71923621, deviceId=20, source=0x0, displayId=0 } KeyEvent { action=ACTION_UP, keyCode=KEYCODE_A, scanCode=30, metaState=META_META_ON|META_META_LEFT_ON, flags=0x0, repeatCount=0, eventTime=71923828, downTime=71923828, deviceId=20, source=0x0, displayId=0 } KeyEvent { action=ACTION_UP, keyCode=KEYCODE_META_LEFT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=71923895, downTime=71923895, deviceId=0, source=0x0, displayId=0 } KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_META_RIGHT, scanCode=0, metaState=META_META_ON|META_META_RIGHT_ON, flags=0x0, repeatCount=0, eventTime=71924974, downTime=71924974, deviceId=0, source=0x0, displayId=0 } KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_A, scanCode=30, metaState=META_META_ON|META_META_RIGHT_ON, flags=0x0, repeatCount=0, eventTime=71925485, downTime=71925485, deviceId=20, source=0x0, displayId=0 } KeyEvent { action=ACTION_UP, keyCode=KEYCODE_A, scanCode=30, metaState=META_META_ON|META_META_RIGHT_ON, flags=0x0, repeatCount=0, eventTime=71925653, downTime=71925653, deviceId=20, source=0x0, displayId=0 } KeyEvent { action=ACTION_UP, keyCode=KEYCODE_META_RIGHT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=71925807, downTime=71925807, deviceId=0, source=0x0, displayId=0 } KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_META_RIGHT, scanCode=0, metaState=META_META_ON|META_META_RIGHT_ON, flags=0x0, repeatCount=0, eventTime=71926085, downTime=71926085, deviceId=0, source=0x0, displayId=0 } KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_A, scanCode=30, metaState=META_META_ON|META_META_RIGHT_ON, flags=0x0, repeatCount=0, eventTime=71926575, downTime=71926575, deviceId=20, source=0x0, displayId=0 } KeyEvent { action=ACTION_UP, keyCode=KEYCODE_A, scanCode=30, metaState=META_META_ON|META_META_RIGHT_ON, flags=0x0, repeatCount=0, eventTime=71926774, downTime=71926774, deviceId=20, source=0x0, displayId=0 } KeyEvent { action=ACTION_UP, keyCode=KEYCODE_META_RIGHT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=71926824, downTime=71926824, deviceId=0, source=0x0, displayId=0 } KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_META_RIGHT, scanCode=0, metaState=META_META_ON|META_META_RIGHT_ON, flags=0x0, repeatCount=0, eventTime=71927085, downTime=71927085, deviceId=0, source=0x0, displayId=0 } KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_A, scanCode=30, metaState=META_META_ON|META_META_RIGHT_ON, flags=0x0, repeatCount=0, eventTime=71927527, downTime=71927527, deviceId=20, source=0x0, displayId=0 } KeyEvent { action=ACTION_UP, keyCode=KEYCODE_A, scanCode=30, metaState=META_META_ON|META_META_RIGHT_ON, flags=0x0, repeatCount=0, eventTime=71927748, downTime=71927748, deviceId=20, source=0x0, displayId=0 } KeyEvent { action=ACTION_UP, keyCode=KEYCODE_META_RIGHT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=71927804, downTime=71927804, deviceId=0, source=0x0, displayId=0 } Preview text: ```