Closed Triw-12 closed 12 hours ago
@Triw-12 Hi, thank you for creating an issue. Could you please attach the install and error logs, both you can find under the directory /var/log/asus-numberpad-driver
.
Hello, Here are the files: error.log install-25-07-2024-18-23-00.log
@Triw-12 Please add to this file asus_numberpad_driver.wayland.service
line Environment="LOG=DEBUG"
under [Service]
and reinstall. In the error log you now should see the mapping of keys sent by your compositor though Wayland to this driver. Find something like (but with Wayland instead of X11):
2024-07-21 16:54:48,636 DEBUG X11 will try to load keymap
2024-07-21 16:54:48,637 DEBUG X11 loaded keymap succesfully
2024-07-21 16:54:48,637 DEBUG {'Num_Lock': KEY_NUMLOCK:69, '0': KEY_0:11, '1': KEY_1:2, '2': KEY_2:3, '3': KEY_3:4, '4': KEY_4:5, '5': KEY_5:6, '6': KEY_6:7, '7': KEY_7:8, '8': KEY_8:9, '9': KEY_9:10, 'a': KEY_A:30, 'b': KEY_B:48, 'c': KEY_C:46, 'd': KEY_D:32, 'e': KEY_E:18, 'f': KEY_F:33, 'Shift_L': KEY_LEFTSHIFT:42, 'Control_L': KEY_LEFTCTRL:29, 'u': KEY_U:22, 'space': KEY_SPACE:57, 'slash': KEY_SLASH:53, 'BackSpace': KEY_BACKSPACE:14, 'asterisk': [KEY_LEFTSHIFT:42, KEY_8:9], 'minus': KEY_MINUS:12, 'percent': [KEY_LEFTSHIFT:42, KEY_5:6], 'period': KEY_DOT:52, 'Return': KEY_ENTER:28, 'plus': [KEY_LEFTSHIFT:42, KEY_EQUAL:13], 'equal': KEY_EQUAL:13}
or post here entire log.
2024-07-27 14:44:21,169 DEBUG Wayland will try to load keymap
2024-07-27 14:44:21,199 DEBUG Wayland loaded keymap succesfully
2024-07-27 14:44:21,199 DEBUG {'Num_Lock': KEY_NUMLOCK:69, '0': [KEY_LEFTSHIFT:42, KEY_0:11], '1': [KEY_LEFTSHIFT:42, KEY_1:2], '2': [KEY_LEFTSHIFT:42, KEY_2:3], '3': [KEY_LEFTSHIFT:42, KEY_3:4], '4': [KEY_LEFTSHIFT:42, KEY_4:5], '5': [KEY_LEFTSHIFT:42, KEY_5:6], '6': [KEY_LEFTSHIFT:42, KEY_6:7], '7': [KEY_LEFTSHIFT:42, KEY_7:8], '8': [KEY_LEFTSHIFT:42, KEY_8:9], '9': [KEY_LEFTSHIFT:42, KEY_9:10], 'a': KEY_Q:16, 'b': KEY_B:48, 'c': KEY_C:46, 'd': KEY_D:32, 'e': KEY_E:18, 'f': KEY_F:33, 'Shift_L': KEY_LEFTSHIFT:42, 'Control_L': KEY_LEFTCTRL:29, 'u': KEY_U:22, 'space': KEY_SPACE:57, 'slash': [KEY_LEFTSHIFT:42, KEY_DOT:52], 'BackSpace': KEY_BACKSPACE:14, 'asterisk': KEY_BACKSLASH:43, 'minus': KEY_6:7, 'percent': [KEY_LEFTSHIFT:42, KEY_APOSTROPHE:40], 'period': [KEY_LEFTSHIFT:42, KEY_COMMA:51], 'Return': KEY_ENTER:28, 'plus': [KEY_LEFTSHIFT:42, KEY_EQUAL:13], 'equal': KEY_EQUAL:13}
@Triw-12 Corresponds that to the configuration inside your Wayland compositor? Keymap layout? In other words Is that correct? (I do not know which one - compositor - you use, e.g. hyprland)
EDIT: Do you have multiple keyboard layouts? Try install English with querty and switch between azerty and querty. Because you have enabled debugging you should now see in driver log layout Is changed and even key map should be changed every time.
@Triw-12 About 1st problem, does work slide gesture to the center? To activating? Please, attach me here clean driver log with attempt.
EDIT: try on the latest master, please
Thank you for your prompt replies and sorry mine were a bit slow.
@Triw-12 Corresponds that to the configuration inside your Wayland compositor? Keymap layout? In other words Is that correct? (I do not know which one - compositor - you use, e.g. hyprland)
EDIT: Do you have multiple keyboard layouts? Try install English with querty and switch between azerty and querty. Because you have enabled debugging you should now see in driver log layout Is changed and even key map should be changed every time.
I have the impression that the shift is not properly configured: it should be at 52 rather than 42 (I'm running GNOME) wayland.txt
@Triw-12 About 1st problem, does work slide gesture to the center? To activating? Please, attach me here clean driver log with attempt.
EDIT: try on the latest master, please
By touching the numlock for more than a second :
2024-07-28 15:43:58,665 INFO Touched top_right_icon area (numlock) in time: 1722174238.6650488
2024-07-28 15:43:58,940 INFO Un-touched top_right_icon area (representing numlock key) in time: 1722174238.9404347
2024-07-28 15:43:59,141 INFO Un-touched top_right_icon area (representing numlock key) in time: 1722174239.1409836
2024-07-28 15:43:59,984 INFO Un-touched top_right_icon area (representing numlock key) in time: 1722174239.9849148
2024-07-28 15:44:00,305 INFO Un-touched top_right_icon area (representing numlock key) in time: 1722174240.3049948
2024-07-28 15:44:00,584 INFO Un-touched top_right_icon area (representing numlock key) in time: 1722174240.5846543
2024-07-28 15:44:00,905 INFO Un-touched top_right_icon area (representing numlock key) in time: 1722174240.9049573
2024-07-28 15:44:00,945 INFO Un-touched top_right_icon area (representing numlock key) in time: 1722174240.944957
2024-07-28 15:44:00,984 INFO Un-touched top_right_icon area (representing numlock key) in time: 1722174240.9844425
2024-07-28 15:44:01,064 INFO Un-touched top_right_icon area (representing numlock key) in time: 1722174241.0644221
2024-07-28 15:44:01,144 INFO Un-touched top_right_icon area (representing numlock key) in time: 1722174241.1442242
2024-07-28 15:44:01,224 INFO Un-touched top_right_icon area (representing numlock key) in time: 1722174241.2247372
Numpad remains off
By locking the numpad manually (change enable from numberpad_dev
) and sliding the second button:
2024-07-28 15:50:13,986 INFO Touched top_left_icon area in time: 1722174613.9867203
2024-07-28 15:50:14,268 INFO Un-touched top_left_icon area in time: 1722174614.26861
2024-07-28 15:50:14,348 INFO Un-touched top_left_icon area in time: 1722174614.3488176
2024-07-28 15:50:14,552 INFO Un-touched top_left_icon area in time: 1722174614.5523615
2024-07-28 15:50:14,712 INFO Un-touched top_left_icon area in time: 1722174614.712445
2024-07-28 15:50:14,793 INFO Un-touched top_left_icon area in time: 1722174614.7930832
2024-07-28 15:50:14,833 INFO Un-touched top_left_icon area in time: 1722174614.8330245
2024-07-28 15:50:14,872 INFO Un-touched top_left_icon area in time: 1722174614.8724062
2024-07-28 15:50:15,033 INFO Un-touched top_left_icon area in time: 1722174615.0330153
2024-07-28 15:50:15,073 INFO Un-touched top_left_icon area in time: 1722174615.0729878
2024-07-28 15:50:15,113 INFO Un-touched top_left_icon area in time: 1722174615.1129735
2024-07-28 15:50:15,153 INFO Un-touched top_left_icon area in time: 1722174615.1529942
Full logs since reinstallation (I think there was an error during installation, which is why I'm putting it here): error.log
Thank you for your prompt replies and sorry mine were a bit slow.
@Triw-12 Corresponds that to the configuration inside your Wayland compositor? Keymap layout? In other words Is that correct? (I do not know which one - compositor - you use, e.g. hyprland)
EDIT: Do you have multiple keyboard layouts? Try install English with querty and switch between azerty and querty. Because you have enabled debugging you should now see in driver log layout Is changed and even key map should be changed every time.
I have the impression that the shift is not properly configured: it should be at 52 rather than 42 (I'm running GNOME) wayland.txt
@Triw-12 Which Azerty keyboard layout do you use? Is modified? or is it the same as the original one? I would like to replicate your problem.
EDIT: why do you think correct is 52? You can look at my X11 output posted earlier, I have shift with event code 42 (50 keycode - 8) and I use standard US keyboard without modification and you have the same:
...
keycode 50 = Shift_L NoSymbol Shift_L NoSymbol Shift_L Shift_L
...
@Triw-12 Strangely, this problem does not appear in the search bars. Strangely enough, this problem does not appear in the search bars, but in applications such as word processing or the calculator, the problem does appear.
@Triw-12 Can you please confirm that manually printing numbers using shift+numeric key above letters line QWERTY works? If I understood you correctly it works only in some places?
EDIT: I would still recommend to you install QWERTY keyboard and try to switch between them.
@Triw-12 Have you installed distribution in clean way? Or you modified / installed wayland compositor by your own?
@Triw-12 Install dconf
and look here, especially try to disable per-window
Is your keyboard current?
Here is my keyboard configuration :
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="fr"
XKBVARIANT="latin9"
XKBOPTIONS=""
BACKSPACE="guess"
@Triw-12 Strangely, this problem does not appear in the search bars. Strangely enough, this problem does not appear in the search bars, but in applications such as word processing or the calculator, the problem does appear.
@Triw-12 Can you please confirm that manually printing numbers using shift+numeric key above letters line QWERTY works? If I understood you correctly it works only in some places?
EDIT: I would still recommend to you install QWERTY keyboard and try to switch between them.
I've tried it with an English keyboard and it works for numbers but not for operators (+, -, *, %, =). Unfortunately, I've tried with other keyboards but the numpad doesn't work anymore since I put the new configuration, but I get a new error in error.log :
Exception in thread Thread-6 (check_gnome_layout):
Traceback (most recent call last):
File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/usr/share/asus-numberpad-driver/numberpad.py", line 950, in check_gnome_layout
layout_is_active = keyboard_state.layout_index_is_active(mru_layout_index, xkb.StateComponent.XKB_STATE_LAYOUT_EFFECTIVE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/asus-numberpad-driver/.env/lib/python3.11/site-packages/xkbcommon/xkb.py", line 1221, in layout_index_is_active
raise XKBInvalidLayoutIndex()
xkbcommon.xkb.XKBInvalidLayoutIndex
I've run a sudo evtest and the numpad is detected, but when I press the keys, nothing happens...
@Triw-12 Have you installed distribution in clean way? Or you modified / installed wayland compositor by your own?
I only installed the operating system a week ago (getting the numpad to work was pretty much the first thing I tested), so I'm unlikely to have changed any settings.
EDIT :
@Triw-12 Install dconf and look here, especially try to disable per-window
I don't understand what you want me to do...
I don't understand what you want me to do...
@Triw-12 Install dconf
. On Ubuntu with the command: sudo apt install dconf-editor
. For arch try find out. It may be under the same package name. Then open dconf
and go here /org/gnome/desktop/input-sources/
and post the screenshot of what do you see here.
Please, use the latest master. Not printing numbers at all should be solved by reverting the commit mentioned above.
2nd problem: Numbers return other characters that would correspond if I had pressed the keyboard keys without shift. For example, when I press 7, the character "è" appears (I have an azerty keyboard). Strangely, this problem does not appear in the search bars. Strangely enough, this problem does not appear in the search bars, but in applications such as word processing or the calculator, the problem does appear.
@Triw-12 The second problem appears only after this NumberPad driver installation?
@Triw-12 Install
dconf
. On Ubuntu with the command:sudo apt install dconf-editor
. For arch try find out. It may be under the same package name. Then opendconf
and go here/org/gnome/desktop/input-sources/
and post the screenshot of what do you see here.Please, use the latest master. Not printing numbers at all should be solved by reverting the commit mentioned above.
The latest master has been solved the problem of not printing numbers !
2nd problem: Numbers return other characters that would correspond if I had pressed the keyboard keys without shift. For example, when I press 7, the character "è" appears (I have an azerty keyboard). Strangely, this problem does not appear in the search bars. Strangely enough, this problem does not appear in the search bars, but in applications such as word processing or the calculator, the problem does appear.
@Triw-12 The second problem appears only after this NumberPad driver installation?
Yes, I haven't found any other project that lets you use the numpad with this model.
@Triw-12 I detected an error in the code when using this driver on distribution that uses mru-sources
(later gnome) and wayland. Was not prioritized active layout from source mru-sources
/ was not reloaded keymap. Attempt to fix I have committed to the branch https://github.com/asus-linux-drivers/asus-numberpad-driver/tree/187-characters-do-not-match. Please, test it and let me know.
Sorry, but I have the impression that nothing has changed...
The strange thing is that the problem doesn't appear on certain search bars (such as gnome's application search) and when it doesn't work, it's the buttons that are engaged that are good, it's just the shift that doesn't work (after that I'm not sure how your code works)...
@Triw-12 Hm. Please, do this in the mentioned branch:
$ systemctl stop --user asus_numberpad_driver@$USER.service # stop running service
$ cd asus-numberpad-driver
$ LOG=DEBUG /usr/share/asus-numberpad-driver/.env/bin/python3 /usr/share/asus-numberpad-driver/numberpad.py "up5401ea" # run with debug logs
And try to change the keyboard layouts during. How do you change them? Using the top panel? Open dconf
application and keep watching whether is the most recently used (mru_sources
here /org/gnome/desktop/input-sources/mru-sources
) the same as is displayed on the top panel.
And check whether is the last visible keymap in the log correct for the currently selected keyboard layout. For me is this correct for US keyboard:
2024-08-17 17:59:47,302 DEBUG {'Num_Lock': KEY_NUMLOCK:69, '0': KEY_0:11, '1': KEY_1:2, '2': KEY_2:3, '3': KEY_3:4, '4': KEY_4:5, '5': KEY_5:6, '6': KEY_6:7, '7': KEY_7:8, '8': KEY_8:9, '9': KEY_9:10, 'a': KEY_A:30, 'b': KEY_B:48, 'c': KEY_C:46, 'd': KEY_D:32, 'e': KEY_E:18, 'f': KEY_F:33, 'Shift_L': KEY_LEFTSHIFT:42, 'Control_L': KEY_LEFTCTRL:29, 'u': KEY_U:22, 'space': KEY_SPACE:57, 'slash': KEY_SLASH:53, 'BackSpace': KEY_BACKSPACE:14, 'asterisk': [KEY_LEFTSHIFT:42, KEY_8:9], 'minus': KEY_MINUS:12, 'percent': [KEY_LEFTSHIFT:42, KEY_5:6], 'period': KEY_DOT:52, 'Return': KEY_ENTER:28, 'plus': [KEY_LEFTSHIFT:42, KEY_EQUAL:13], 'equal': KEY_EQUAL:13}
When I swap to French BEPO, this is correct for me:
2024-08-17 18:13:21,985 DEBUG {'Num_Lock': KEY_NUMLOCK:69, '0': [KEY_LEFTSHIFT:42, KEY_0:11], '1': [KEY_LEFTSHIFT:42, KEY_1:2], '2': [KEY_LEFTSHIFT:42, KEY_2:3], '3': [KEY_LEFTSHIFT:42, KEY_3:4], '4': [KEY_LEFTSHIFT:42, KEY_4:5], '5': [KEY_LEFTSHIFT:42, KEY_5:6], '6': [KEY_LEFTSHIFT:42, KEY_6:7], '7': [KEY_LEFTSHIFT:42, KEY_7:8], '8': [KEY_LEFTSHIFT:42, KEY_8:9], '9': [KEY_LEFTSHIFT:42, KEY_9:10], 'a': KEY_Q:16, 'b': KEY_B:48, 'c': KEY_C:46, 'd': KEY_D:32, 'e': KEY_E:18, 'f': KEY_F:33, 'Shift_L': KEY_LEFTSHIFT:42, 'Control_L': KEY_LEFTCTRL:29, 'u': KEY_U:22, 'space': KEY_SPACE:57, 'slash': [KEY_LEFTSHIFT:42, KEY_DOT:52], 'BackSpace': KEY_BACKSPACE:14, 'asterisk': KEY_BACKSLASH:43, 'minus': KEY_6:7, 'percent': [KEY_LEFTSHIFT:42, KEY_APOSTROPHE:40], 'period': [KEY_LEFTSHIFT:42, KEY_COMMA:51], 'Return': KEY_ENTER:28, 'plus': [KEY_LEFTSHIFT:42, KEY_EQUAL:13], 'equal': KEY_EQUAL:13}
What is the name of the application for zhich it does not work? I have found no problematic app in the virtual box wayland gnome ubuntu 22.04.
@Triw-12 Do not have you shift as part of specific shortcut bound inside that app for which it does not work? So shift, and keys generaly for current keyboard layout (US, FR, CZ, ..) are sent from the driver succesfully (check using $ libinput debug-events
, compare with what Is send from physical keyboard and let me know) but shift is consumed. Does it not work for multiple apps? I need to replicated that problem in my environment.
@Triw-12 In short, I would focus what sequence of keys do send physical keyboard ($ libinput debug-events
) for one specific problematics character for app when it works and when it does not and the same / what send this driver.
After testing, the keyboard change is well recognized (thanks to the upper panel) and seems correct: For French AZERTY :
2024-08-18 15:01:47,828 DEBUG {'Num_Lock': KEY_NUMLOCK:69, '0': [KEY_LEFTSHIFT:42, KEY_0:11], '1': [KEY_LEFTSHIFT:42, KEY_1:2], '2': [KEY_LEFTSHIFT:42, KEY_2:3], '3': [KEY_LEFTSHIFT:42, KEY_3:4], '4': [KEY_LEFTSHIFT:42, KEY_4:5], '5': [KEY_LEFTSHIFT:42, KEY_5:6], '6': [KEY_LEFTSHIFT:42, KEY_6:7], '7': [KEY_LEFTSHIFT:42, KEY_7:8], '8': [KEY_LEFTSHIFT:42, KEY_8:9], '9': [KEY_LEFTSHIFT:42, KEY_9:10], 'a': KEY_Q:16, 'b': KEY_B:48, 'c': KEY_C:46, 'd': KEY_D:32, 'e': KEY_E:18, 'f': KEY_F:33, 'Shift_L': KEY_LEFTSHIFT:42, 'Control_L': KEY_LEFTCTRL:29, 'u': KEY_U:22, 'space': KEY_SPACE:57, 'slash': [KEY_LEFTSHIFT:42, KEY_DOT:52], 'BackSpace': KEY_BACKSPACE:14, 'asterisk': KEY_BACKSLASH:43, 'minus': KEY_6:7, 'percent': [KEY_LEFTSHIFT:42, KEY_APOSTROPHE:40], 'period': [KEY_LEFTSHIFT:42, KEY_COMMA:51], 'Return': KEY_ENTER:28, 'plus': [KEY_LEFTSHIFT:42, KEY_EQUAL:13], 'equal': KEY_EQUAL:13}
For French BEPO :
2024-08-18 15:13:01,908 DEBUG {'Num_Lock': KEY_NUMLOCK:69, '0': [KEY_LEFTSHIFT:42, KEY_0:11], '1': [KEY_LEFTSHIFT:42, KEY_1:2], '2': [KEY_LEFTSHIFT:42, KEY_2:3], '3': [KEY_LEFTSHIFT:42, KEY_3:4], '4': [KEY_LEFTSHIFT:42, KEY_4:5], '5': [KEY_LEFTSHIFT:42, KEY_5:6], '6': [KEY_LEFTSHIFT:42, KEY_6:7], '7': [KEY_LEFTSHIFT:42, KEY_7:8], '8': [KEY_LEFTSHIFT:42, KEY_8:9], '9': [KEY_LEFTSHIFT:42, KEY_9:10], 'a': KEY_A:30, 'b': KEY_Q:16, 'c': KEY_H:35, 'd': KEY_I:23, 'e': KEY_F:33, 'f': KEY_SLASH:53, 'Shift_L': KEY_LEFTSHIFT:42, 'Control_L': KEY_LEFTCTRL:29, 'u': KEY_S:31, 'space': KEY_SPACE:57, 'slash': KEY_9:10, 'BackSpace': KEY_BACKSPACE:14, 'asterisk': KEY_0:11, 'minus': KEY_8:9, 'percent': KEY_EQUAL:13, 'period': KEY_V:47, 'Return': KEY_ENTER:28, 'plus': KEY_7:8, 'equal': KEY_MINUS:12}
Shift-click also works correctly : For a click with the numpad (with libinput):
-event17 KEYBOARD_KEY +62.683s *** (-1) pressed
event17 KEYBOARD_KEY +62.684s *** (-1) pressed
event17 KEYBOARD_KEY +62.684s *** (-1) released
event17 KEYBOARD_KEY +62.684s *** (-1) released
For a physical click :
-event0 KEYBOARD_KEY +66.762s *** (-1) pressed
event0 KEYBOARD_KEY +66.942s *** (-1) pressed
event0 KEYBOARD_KEY +67.060s *** (-1) released
event0 KEYBOARD_KEY +67.066s *** (-1) released
The problem only appears in certain applications where the shift is not necessarily a shortcut:
But does not appear in:
Can be reopened.
Describe the bug
1st problem: the buttons for changing numpad brightness and for activating/deactivating the numpad simply don't work, even with a long press.
2nd problem: Numbers return other characters that would correspond if I had pressed the keyboard keys without shift. For example, when I press 7, the character "è" appears (I have an azerty keyboard). Strangely, this problem does not appear in the search bars. Strangely enough, this problem does not appear in the search bars, but in applications such as word processing or the calculator, the problem does appear.
Expected behavior
I'd like the keyboard to switch on/off when I press the top keys, and to be able to adjust the contrast. I'd like the keys to display numbers correctly.
Relevant log output
Desktop