if (key_code == VKEY_DECIMAL && dom_key == DomKey::UNIDENTIFIED &&
(keyboard_modifiers_ & EF_NUM_LOCK_ON) == 0) {
key_code = VKEY_DELETE;
dom_key = DomKey::DEL;
}
While I suppose this maybe true in most cases, could there be some keyboard layouts where this isn't necessarily true? Also, would be good to understand why the lookup doesn't work in the first place, i.e. if this is a bug in libxkbcommon.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
case XKB_KEY_KP_Delete:
Do we know why other numpad non-characters work when numlock is off? e.g. PgDown (instead of 3), Left arrow (instead of 4), End (instead of 1)
if (plain_keysym != XKB_KEY_KP_Delete && xkb_keysym != XKB_KEY_KP_Decimal &&
This still feels like a workaround that assumes a layout where decimal and delete are on the same physical key. Could we make it more generic perhaps? i.e. instead of hard-coding `plain_keysym != XKB_KEY_KP_Delete && xkb_keysym != XKB_KEY_KP_Decimal` could we instead check one of the following
```suggestion
if (plain_keysym != XKB_KEY_KP_Delete && xkb_keysym != plain_keysym &&
```
if (key_code == VKEY_DECIMAL && dom_key == DomKey::UNIDENTIFIED &&
(keyboard_modifiers_ & EF_NUM_LOCK_ON) == 0) {
key_code = VKEY_DELETE;
dom_key = DomKey::DEL;
}
While I suppose this maybe true in most cases, could there be some keyboard layouts where this isn't necessarily true? Also, would be good to understand why the lookup doesn't work in the first place, i.e. if this is a bug in libxkbcommon.
Done
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Do we know why other numpad non-characters work when numlock is off? e.g. PgDown (instead of 3), Left arrow (instead of 4), End (instead of 1)
They are handled on the same file starting from line 84: source.chromium.org/chromium/chromium/src/+/main:ui/events/keycodes/keyboard_code_conversion_xkb.cc;l=84
if (plain_keysym != XKB_KEY_KP_Delete && xkb_keysym != XKB_KEY_KP_Decimal &&
This still feels like a workaround that assumes a layout where decimal and delete are on the same physical key. Could we make it more generic perhaps? i.e. instead of hard-coding `plain_keysym != XKB_KEY_KP_Delete && xkb_keysym != XKB_KEY_KP_Decimal` could we instead check one of the following
- `plain_keysym != XKB_KEY_KP_Delete && xkb_keysym != plain_keysym`
- `IsNotPrintable(plain_keysym) && IsPrintable(xkb_keysym)`
```suggestion
if (plain_keysym != XKB_KEY_KP_Delete && xkb_keysym != plain_keysym &&
```
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi, Could you please review this change!
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks! I have no expertise whatsoever here :P. hidehiko@, would you be a good technical reviewer for this CL?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Re-ping.
Could you please take a look at this change when you have the time?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |