Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

key_f13 -> key_f24 seem to be incorrect #33

Closed
mauritzn opened this issue Feb 3, 2021 · 31 comments
Closed

key_f13 -> key_f24 seem to be incorrect #33

mauritzn opened this issue Feb 3, 2021 · 31 comments

Comments

@mauritzn
Copy link

mauritzn commented Feb 3, 2021

I usually try to map mouse buttons to f13 -> f24 since they are pretty much unused, but using key_f13 does not provide a valid f13 for the games that normally accept f13 without problems (tried World of Warcraft and Minecraft).

I tried the same with key_f2 rather than the normal f2 mapping and it has the same issue. I'm not sure if mappings with "key_" are meant to be different, but they seem to be different at least for games.

So would it be possible to get similar mappings as f1 -> f12, for f13 -> f24 (aka where there isn't a "key_" prefix)?

Best regards,
Mauritz

@sezanzeb
Copy link
Owner

sezanzeb commented Feb 3, 2021

key_ is the constant name from the kernel https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h, and depending on your keyboard layout key_y might not map to y

stuff without key_ is from xmodmap -pke, and y will always map to y.

unfortunately, the window manager won't know what to do with keycodes that are not present in xmodmap -pke, so it won't use them in applications. I have put some thoughts into writing my own xkb symbols and keycodes files to support any key, but it's somewhat troublesome. Basically it would look up the configured mapping, take f13, insert it into its xkb config, remember the keycode for that within those config files and use that keycode from now on. setxkbmap would then load that file path for a specific device.

so f13 was working on windows for games when configuring your device and you are looking for a way to do the same thing on linux?

It will take quite some time until I get to work on that front, there are some other things in the queue already. But it's part of the roadmap, even though I don't look forward to it. I'll try to implement it as an optional step when starting injections that can be disabled, in order to not end up with a pipeline that relies on it.

@sezanzeb sezanzeb closed this as completed Feb 3, 2021
@sezanzeb sezanzeb reopened this Feb 3, 2021
@mauritzn
Copy link
Author

mauritzn commented Feb 3, 2021

I was using f23 -> f24 on Windows and on Linux. On Windows i used Logitech's software and on Linux I modified some config files to remap it, I honestly don't exactly remember how I did it on Linux because it was a hassle and took many tries (which is why I was ecstatic when I found key-mapper) and the hassle was almost 2 years ago by now.

But did some testing in xmodmap and it did not give me any errors using F13 -> F24 as keysyms, or at least it didn't scream at me with: bad keysym name 'F13' in keysym list, so I don't know if that means that they work or not, didn't find F13 -> F24 using xmodmap -pke, but xmodmap not regarding them as invalid keysyms seems good?

From what I remember back when I did the mouse remapping on Linux I did end up using xkb.

(tbh I'm not very knowledgeable when it comes to xmodmap or xkb, only used them that one time almost 2 years ago...)

@sezanzeb
Copy link
Owner

sezanzeb commented Feb 4, 2021

can you try to create a file with:

keycode 202 = F24

then run xmodmap <filename>?

close and open key-mapper to configure f24 there afterwards and see if it works in your games

@mauritzn
Copy link
Author

mauritzn commented Feb 4, 2021

Wow, that worked it now shows up in key-mapper and mapping it worked for Minecraft, but it didn't work for World of Warcraft though (World of Warcraft is running in Wine, if that matters?)

Edit: I also tried it in Heroes of the Storm (another Blizzard game running through Wine), the first time I pressed the mouse button it showed up as Numlock, but after that it showed up as F24

Edit: Minecraft seems to have been the exception, tried Astroneer, CS:GO, Call of Duty: World at War and Don't Start Together, the only game that even tried to assign the key was Astroneer, it did a similar thing as Heroes of the Storm, first assigning it as NUM LOCK and when pressed again assigning it as None, all the other games failed to assign it, but they all did assign F7 properly using key-mapper.

@sezanzeb
Copy link
Owner

sezanzeb commented Feb 4, 2021

I will let you know once the xkb configs are written and applied by key-mapper, maybe that makes a difference over using xmodmap.

@sezanzeb
Copy link
Owner

sezanzeb commented Feb 26, 2021

You could try running the xkb branch. It worked recently for me

  • does mapping "colon", "odiaeresis" or "ccedilla" work? Which keyboard layout are you on? To test it you need to name a key that is not in your system layout without pressing modifiers
  • does F24 work?

There are no unittests yet so I can't release it at the moment. And I'd like to figure out how to enable autorepeat when holding down one of the keys via the xkb config

@mauritzn
Copy link
Author

mauritzn commented Feb 28, 2021

Not sure if I am running it correctly, I tried running it by building the deb and by running key-mapper-gtk in bin, f13-f24 does not show up (or are they still suppose to be the key_* versions?)

Mapping odiaeresis shows up as ö when pressed. I don't see any colon or ccedilla in the mapping, the closest is key_semicolon and it also shows up as ö when pressed.

I have a Finnish keyboard layout (This one).

Edit: This does show up in the terminal when running key-mapper-gtk directly from bin (when ever I apply a change in key-mapper): Applying xkb configuration

@sezanzeb
Copy link
Owner

sezanzeb commented Mar 1, 2021

Just type in "F24" and "ccedilla", don't worry about the dropdown suggestions.

Sounds like you got it to work. You can verify that by looking at the top of the log, it should say "dc547895cf9c5c12e33b49c2967c68d1f9ef0aab"

@mauritzn
Copy link
Author

mauritzn commented Mar 1, 2021

I did try adding f24 earlier but didn't work, I was using the deb version then though (think it may have still been running the old version that was installed earlier), now I am running it through the bin folder using Python and it did at least work, but it did not output the correct keys, it always outputed the escape key, both for ccedilla and F13-F24.

Not sure where I'm suppose to find that hash in the log, at least the log that shows up for me (in the terminal window) does not include a hash, do I need to run it in debug mode for that?

What my terminal shows on the first 3 lines:

<USER>@kubuntu:~/Downloads/key-mapper-xkb$ sudo python3 ./bin/key-mapper-gtk
key-mapper 0.6.1  https://github.com/sezanzeb/key-mapper
python-evdev 1.3.0
Loaded config from "/home/<USER>/.config/key-mapper/config.json"

@sezanzeb
Copy link
Owner

sezanzeb commented Mar 3, 2021

If you run it from the bin directory it won't output the hash, because it is setup.py that adds it. Debug mode is not required, it should display the hash in the first line.

I never tried if running from the bin directory works correctly. I can provide you with a .deb file later

@mauritzn
Copy link
Author

mauritzn commented Mar 3, 2021

Okay I tried running it this time using setup.py, this time the messages in the terminal seem to make a bit more sense, but all buttons that are "unknown" now map to something similar to key_rightalt rather than escape.

The terminal now when running:

Starting injecting the mapping for "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle"
Unknown characters found, creating xkb configs
Creating file "/usr/share/X11/xkb/symbols/key-mapper/Corsair_CORSAIR_HARPOON_RGB_WIRELESS_Gaming_Dongle"
Writing xkb symbols "/usr/share/X11/xkb/symbols/key-mapper/Corsair_CORSAIR_HARPOON_RGB_WIRELESS_Gaming_Dongle"
Applying xkb configuration
Device "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle" is currently mapped

@sezanzeb
Copy link
Owner

sezanzeb commented Mar 3, 2021

thanks. and with -d?

@mauritzn
Copy link
Author

mauritzn commented Mar 4, 2021

It shows the same thing as earlier, I did not include the whole thing in the last one, but this is the one running with -d

<user>@kubuntu:~$ key-mapper-gtk-pkexec -d
key-mapper 0.6.1  https://github.com/sezanzeb/key-mapper
python-evdev 1.3.0
Loaded config from "/home/<user>/.config/key-mapper/config.json"
WARNING: The daemon "key-mapper-service" is not running, mapping keys only works as long as the window is open. Try `sudo systemctl start key-mapper`
Found "Eee PC WMI hotkeys", "Metadot - Das Keyboard Das Keyboard", "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle", "Cooler Master Technology Inc. AMD SR4 lamplight Control", "Aureon 7.1 USB"
Loading preset from "/home/<user>/.config/key-mapper/presets/Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle/Main.json"
Updating configs for "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle", "Main"
Saving preset to /home/<user>/.config/key-mapper/presets/Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle/Main.json
Applying preset "Main" for "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle"
Loaded config from "/home/<user>/.config/key-mapper/config.json"
Found "Eee PC WMI hotkeys", "Metadot - Das Keyboard Das Keyboard", "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle", "Cooler Master Technology Inc. AMD SR4 lamplight Control", "Aureon 7.1 USB"
Loading preset from "/home/<user>/.config/key-mapper/presets/Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle/Main.json"
Starting injecting the mapping for "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle"
Unknown characters found, creating xkb configs
Creating file "/usr/share/X11/xkb/symbols/key-mapper/Corsair_CORSAIR_HARPOON_RGB_WIRELESS_Gaming_Dongle"
Writing xkb symbols "/usr/share/X11/xkb/symbols/key-mapper/Corsair_CORSAIR_HARPOON_RGB_WIRELESS_Gaming_Dongle"
Applying xkb configuration
Device "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle" is currently mapped

@sezanzeb
Copy link
Owner

sezanzeb commented Mar 4, 2021

sudo key-mapper-gtk -d, the pkexec command doesn't pass the argument

@mauritzn
Copy link
Author

mauritzn commented Mar 4, 2021

Ahh okay, this is the full debug output, It also includes pressing the mapped keys.

Key-mapper output with -d
[user]@kubuntu:~$ sudo key-mapper-gtk -d
0.00277 INFO: logger.py, line 155, key-mapper 0.6.1  https://github.com/sezanzeb/key-mapper
0.00305 INFO: logger.py, line 161, python-evdev 1.3.0
0.00308 WARNING: logger.py, line 167, Debug level will log all your keystrokes! Do not post this output in the internet if you typed in sensitive or private information with your device!
0.00312 DEBUG: logger.py, line 173, pid 774699
0.02366 INFO: config.py, line 250, Loaded config from "/home/[user]/.config/key-mapper/config.json"
0.02386 DEBUG: state.py, line 89, Gathering available keycodes
0.02753 DEBUG: state.py, line 112, Writing "/home/[user]/.config/key-mapper/xmodmap"
0.09926 WARNING: daemon.py, line 77, The daemon "key-mapper-service" is not running, mapping keys only works as long as the window is open. Try `sudo systemctl start key-mapper`
0.09939 DEBUG: daemon.py, line 214, Creating daemon
0.10123 DEBUG: data.py, line 85, Found data at "/usr/share/key-mapper"
0.48280 DEBUG: getdevices.py, line 120, Discovering device paths
0.88414 SPAM: getdevices.py, line 161, Found "25,0,0", "/dev/input/event11", "Eee PC WMI hotkeys" 
0.93211 SPAM: getdevices.py, line 161, Found "3,9456,320", "/dev/input/event9", "Metadot - Das Keyboard Das Keyboard Consumer Control" 
0.95613 SPAM: getdevices.py, line 161, Found "3,9456,320", "/dev/input/event8", "Metadot - Das Keyboard Das Keyboard System Control" 
0.98415 SPAM: getdevices.py, line 161, Found "3,9456,320", "/dev/input/event7", "Metadot - Das Keyboard Das Keyboard" 
1.02012 SPAM: getdevices.py, line 161, Found "3,6940,7013", "/dev/input/event6", "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle" 
1.05213 SPAM: getdevices.py, line 161, Found "3,9494,81", "/dev/input/event5", "Cooler Master Technology Inc. AMD SR4 lamplight Control Consumer Control" 
1.08414 SPAM: getdevices.py, line 161, Found "3,9494,81", "/dev/input/event4", "Cooler Master Technology Inc. AMD SR4 lamplight Control System Control" 
1.13222 SPAM: getdevices.py, line 161, Found "3,9494,81", "/dev/input/event3", "Cooler Master Technology Inc. AMD SR4 lamplight Control" 
1.15212 SPAM: getdevices.py, line 161, Found "3,3277,177", "/dev/input/event2", "Aureon 7.1 USB" 
1.21235 INFO: getdevices.py, line 220, Found "Eee PC WMI hotkeys", "Metadot - Das Keyboard Das Keyboard", "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle", "Cooler Master Technology Inc. AMD SR4 lamplight Control", "Aureon 7.1 USB"
1.21337 DEBUG: presets.py, line 144, The newest preset is "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle", "Main"
1.21355 DEBUG: window.py, line 569, Selecting device "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle"
1.21422 DEBUG: window.py, line 334, "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle" presets: "Main"
1.21479 DEBUG: window.py, line 662, Selecting preset "Main"
1.21486 INFO: mapping.py, line 164, Loading preset from "/home/[user]/.config/key-mapper/presets/Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle/Main.json"
1.21508 SPAM: mapping.py, line 197, Key((1, 275, 1),) maps to F24
1.21516 SPAM: mapping.py, line 197, Key((1, 276, 1),) maps to F23
1.23653 DEBUG: reader.py, line 146, Starting reading keycodes from "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle"
5.86364 INFO: window.py, line 514, Applying preset "Main" for "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle"
5.86392 INFO: config.py, line 250, Loaded config from "/home/[user]/.config/key-mapper/config.json"
5.86402 DEBUG: daemon.py, line 225, Refreshing because last info is too old
5.96471 DEBUG: getdevices.py, line 120, Discovering device paths
6.42414 SPAM: getdevices.py, line 161, Found "25,0,0", "/dev/input/event11", "Eee PC WMI hotkeys" 
6.49211 SPAM: getdevices.py, line 161, Found "3,9456,320", "/dev/input/event9", "Metadot - Das Keyboard Das Keyboard Consumer Control" 
6.51606 SPAM: getdevices.py, line 161, Found "3,9456,320", "/dev/input/event8", "Metadot - Das Keyboard Das Keyboard System Control" 
6.54415 SPAM: getdevices.py, line 161, Found "3,9456,320", "/dev/input/event7", "Metadot - Das Keyboard Das Keyboard" 
6.58416 SPAM: getdevices.py, line 161, Found "3,6940,7013", "/dev/input/event6", "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle" 
6.60815 SPAM: getdevices.py, line 161, Found "3,9494,81", "/dev/input/event5", "Cooler Master Technology Inc. AMD SR4 lamplight Control Consumer Control" 
6.64014 SPAM: getdevices.py, line 161, Found "3,9494,81", "/dev/input/event4", "Cooler Master Technology Inc. AMD SR4 lamplight Control System Control" 
6.67220 SPAM: getdevices.py, line 161, Found "3,9494,81", "/dev/input/event3", "Cooler Master Technology Inc. AMD SR4 lamplight Control" 
6.70417 SPAM: getdevices.py, line 161, Found "3,3277,177", "/dev/input/event2", "Aureon 7.1 USB" 
6.75232 INFO: getdevices.py, line 220, Found "Eee PC WMI hotkeys", "Metadot - Das Keyboard Das Keyboard", "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle", "Cooler Master Technology Inc. AMD SR4 lamplight Control", "Aureon 7.1 USB"                                                                                                                                               
6.75245 INFO: mapping.py, line 164, Loading preset from "/home/[user]/.config/key-mapper/presets/Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle/Main.json"
6.75262 SPAM: mapping.py, line 197, Key((1, 275, 1),) maps to F24
6.75269 SPAM: mapping.py, line 197, Key((1, 276, 1),) maps to F23
6.75278 DEBUG: daemon.py, line 436, Using keycodes from "/home/[user]/.config/key-mapper/xmodmap"
6.75333 DEBUG: state.py, line 188, Using 84 for "f24"
6.75339 DEBUG: state.py, line 188, Using 84 for "f23"
6.75343 DEBUG: context.py, line 96, Parsing macros
6.75348 DEBUG: context.py, line 108, No macros configured
6.75763 INFO: pid 774710, injector.py, line 317, Starting injecting the mapping for "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle"
6.77369 DEBUG: pid 774710, injector.py, line 281, Constructed capabilities: {1: [84]}
6.87543 INFO: pid 774710, xkb.py, line 156, Unknown characters found, creating xkb configs
6.87623 INFO: pid 774710, paths.py, line 87, Creating file "/usr/share/X11/xkb/symbols/key-mapper/Corsair_CORSAIR_HARPOON_RGB_WIRELESS_Gaming_Dongle"
6.87656 INFO: pid 774710, xkb.py, line 166, Writing xkb symbols "/usr/share/X11/xkb/symbols/key-mapper/Corsair_CORSAIR_HARPOON_RGB_WIRELESS_Gaming_Dongle"
6.87667 SPAM: pid 774710, xkb.py, line 168, "/usr/share/X11/xkb/symbols/key-mapper/Corsair_CORSAIR_HARPOON_RGB_WIRELESS_Gaming_Dongle":
default xkb_symbols "key-mapper" {                                                                                                                                                           
    key <9> { [ Escape, NoSymbol, Escape ] };                                                                                                                                                
    key <10> { [ 1, exclam, 1, exclam, NoSymbol, exclamdown ] };                                                                                                                             
    key <11> { [ 2, quotedbl, 2, quotedbl, at, rightdoublequotemark, at ] };                                                                                                                 
    key <12> { [ 3, numbersign, 3, numbersign, sterling, guillemotright, sterling ] };                                                                                                       
    key <13> { [ 4, currency, 4, currency, dollar, guillemotleft, dollar ] };                                                                                                                
    key <14> { [ 5, percent, 5, percent, permille, leftdoublequotemark, permille ] };                                                                                                        
    key <15> { [ 6, ampersand, 6, ampersand, singlelowquotemark, doublelowquotemark, singlelowquotemark ] };                                                                                 
    key <16> { [ 7, slash, 7, slash, braceleft, NoSymbol, braceleft ] };                                                                                                                     
    key <17> { [ 8, parenleft, 8, parenleft, bracketleft, less, bracketleft ] };                                                                                                             
    key <18> { [ 9, parenright, 9, parenright, bracketright, greater, bracketright ] };                                                                                                      
    key <19> { [ 0, equal, 0, equal, braceright, degree, braceright ] };                                                                                                                     
    key <20> { [ plus, question, plus, question, backslash, questiondown, backslash ] };                                                                                                     
    key <21> { [ dead_acute, dead_grave, dead_acute, dead_grave, dead_cedilla, dead_ogonek, dead_cedilla ] };                                                                                
    key <22> { [ BackSpace, BackSpace, BackSpace, BackSpace ] };                                                                                                                             
    key <23> { [ Tab, ISO_Left_Tab, Tab, ISO_Left_Tab ] };                                                                                                                                   
    key <24> { [ q, Q, q, Q, q, Q, q ] };                                                                                                                                                    
    key <25> { [ w, W, w, W, w, W, w ] };                                                                                                                                                    
    key <26> { [ e, E, e, E, EuroSign, NoSymbol, EuroSign ] };                                                                                                                               
    key <27> { [ r, R, r, R, r, R, r ] };                                                                                                                                                    
    key <28> { [ t, T, t, T, thorn, THORN, thorn ] };                                                                                                                                        
    key <29> { [ y, Y, y, Y, y, Y, y ] };                                                                                                                                                    
    key <30> { [ u, U, u, U, u, U, u ] };                                                                                                                                                    
    key <31> { [ i, I, i, I, idotless, bar, idotless ] };                                                                                                                                    
    key <32> { [ o, O, o, O, oe, OE, oe ] };                                                                                                                                                 
    key <33> { [ p, P, p, P, dead_horn, dead_hook, dead_horn ] };                                                                                                                            
    key <34> { [ aring, Aring, aring, Aring, dead_doubleacute, dead_abovering, dead_doubleacute ] };                                                                                         
    key <35> { [ dead_diaeresis, dead_circumflex, dead_diaeresis, dead_circumflex, dead_tilde, dead_macron, dead_tilde ] };                                                                  
    key <36> { [ Return, NoSymbol, Return ] };                                                                                                                                               
    key <37> { [ Control_L, NoSymbol, Control_L ] };                                                                                                                                         
    key <38> { [ a, A, a, A, schwa, SCHWA, schwa ] };                                                                                                                                        
    key <39> { [ s, S, s, S, ssharp, U1E9E, ssharp ] };                                                                                                                                      
    key <40> { [ d, D, d, D, eth, ETH, eth ] };                                                                                                                                              
    key <41> { [ f, F, f, F, f, F, f ] };                                                                                                                                                    
    key <42> { [ g, G, g, G, g, G, g ] };                                                                                                                                                    
    key <43> { [ h, H, h, H, h, H, h ] };                                                                                                                                                    
    key <44> { [ j, J, j, J, j, J, j ] };                                                                                                                                                    
    key <45> { [ k, K, k, K, kra, NoSymbol, kra ] };                                                                                                                                         
    key <46> { [ l, L, l, L, dead_stroke, NoSymbol, dead_stroke ] };                                                                                                                         
    key <47> { [ odiaeresis, Odiaeresis, odiaeresis, Odiaeresis, oslash, Oslash, oslash ] };                                                                                                 
    key <48> { [ adiaeresis, Adiaeresis, adiaeresis, Adiaeresis, ae, AE, ae ] };                                                                                                             
    key <49> { [ section, onehalf, section, onehalf, dead_stroke, NoSymbol, dead_stroke ] };                                                                                                 
    key <50> { [ Shift_L, NoSymbol, Shift_L ] };                                                                                                                                             
    key <51> { [ apostrophe, asterisk, apostrophe, asterisk, dead_caron, dead_breve, dead_caron ] };                                                                                         
    key <52> { [ z, Z, z, Z, ezh, EZH, ezh ] };                                                                                                                                              
    key <53> { [ x, X, x, X, multiply, periodcentered, multiply ] };                                                                                                                         
    key <54> { [ c, C, c, C, c, C, c ] };                                                                                                                                                    
    key <55> { [ v, V, v, V, v, V, v ] };                                                                                                                                                    
    key <56> { [ b, B, b, B, b, B, b ] };                                                                                                                                                    
    key <57> { [ n, N, n, N, eng, ENG, eng ] };                                                                                                                                              
    key <58> { [ m, M, m, M, mu, emdash, mu ] };                                                                                                                                             
    key <59> { [ comma, semicolon, comma, semicolon, rightsinglequotemark, leftsinglequotemark, rightsinglequotemark ] };                                                                    
    key <60> { [ period, colon, period, colon, dead_belowdot, dead_abovedot, dead_belowdot ] };                                                                                              
    key <61> { [ minus, underscore, minus, underscore, endash, dead_belowcomma, endash ] };                                                                                                  
    key <62> { [ Shift_R, NoSymbol, Shift_R ] };                                                                                                                                             
    key <63> { [ KP_Multiply, KP_Multiply, KP_Multiply, KP_Multiply, KP_Multiply, KP_Multiply, XF86ClearGrab ] };                                                                            
    key <64> { [ Alt_L, Meta_L, Alt_L, Meta_L ] };                                                                                                                                           
    key <65> { [ space, space, space, space, nobreakspace, NoSymbol, nobreakspace ] };                                                                                                       
    key <66> { [ Caps_Lock, NoSymbol, Caps_Lock ] };                                                                                                                                         
    key <67> { [ F1, F1, F1, F1, F1, F1, XF86Switch_VT_1 ] };                                                                                                                                
    key <68> { [ F2, F2, F2, F2, F2, F2, XF86Switch_VT_2 ] };                                                                                                                                
    key <69> { [ F3, F3, F3, F3, F3, F3, XF86Switch_VT_3 ] };                                                                                                                                
    key <70> { [ F4, F4, F4, F4, F4, F4, XF86Switch_VT_4 ] };                                                                                                                                
    key <71> { [ F5, F5, F5, F5, F5, F5, XF86Switch_VT_5 ] };                                                                                                                                
    key <72> { [ F6, F6, F6, F6, F6, F6, XF86Switch_VT_6 ] };                                                                                                                                
    key <73> { [ F7, F7, F7, F7, F7, F7, XF86Switch_VT_7 ] };                                                                                                                                
    key <74> { [ F8, F8, F8, F8, F8, F8, XF86Switch_VT_8 ] };                                                                                                                                
    key <75> { [ F9, F9, F9, F9, F9, F9, XF86Switch_VT_9 ] };                                                                                                                                
    key <76> { [ F10, F10, F10, F10, F10, F10, XF86Switch_VT_10 ] };                                                                                                                         
    key <77> { [ Num_Lock, NoSymbol, Num_Lock ] };                                                                                                                                           
    key <78> { [ Scroll_Lock, NoSymbol, Scroll_Lock ] };                                                                                                                                     
    key <79> { [ KP_Home, KP_7, KP_Home, KP_7 ] };                                                                                                                                           
    key <80> { [ KP_Up, KP_8, KP_Up, KP_8 ] };                                                                                                                                               
    key <81> { [ KP_Prior, KP_9, KP_Prior, KP_9 ] };                                                                                                                                         
    key <82> { [ KP_Subtract, KP_Subtract, KP_Subtract, KP_Subtract, KP_Subtract, KP_Subtract, XF86Prev_VMode ] };                                                                           
    key <83> { [ KP_Left, KP_4, KP_Left, KP_4 ] };                                                                                                                                           
    key <84> { [ KP_Begin, KP_5, KP_Begin, KP_5 ] };                                                                                                                                         
    key <85> { [ KP_Right, KP_6, KP_Right, KP_6 ] };                                                                                                                                         
    key <86> { [ KP_Add, KP_Add, KP_Add, KP_Add, KP_Add, KP_Add, XF86Next_VMode ] };                                                                                                         
    key <87> { [ KP_End, KP_1, KP_End, KP_1 ] };                                                                                                                                             
    key <88> { [ KP_Down, KP_2, KP_Down, KP_2 ] };                                                                                                                                           
    key <89> { [ KP_Next, KP_3, KP_Next, KP_3 ] };                                                                                                                                           
    key <90> { [ KP_Insert, KP_0, KP_Insert, KP_0 ] };                                                                                                                                       
    key <91> { [ KP_Delete, KP_Separator, KP_Delete, KP_Separator ] };                                                                                                                       
    key <92> { [ ISO_Level3_Shift, NoSymbol, ISO_Level3_Shift ] };                                                                                                                           
    key <94> { [ less, greater, less, greater, bar, brokenbar, bar ] };                                                                                                                      
    key <95> { [ F11, F11, F11, F11, F11, F11, XF86Switch_VT_11 ] };                                                                                                                         
    key <96> { [ F12, F12, F12, F12, F12, F12, XF86Switch_VT_12 ] };                                                                                                                         
    key <98> { [ Katakana, NoSymbol, Katakana ] };                                                                                                                                           
    key <99> { [ Hiragana, NoSymbol, Hiragana ] };                                                                                                                                           
    key <100> { [ Henkan_Mode, NoSymbol, Henkan_Mode ] };                                                                                                                                    
    key <101> { [ Hiragana_Katakana, NoSymbol, Hiragana_Katakana ] };                                                                                                                        
    key <102> { [ Muhenkan, NoSymbol, Muhenkan ] };                                                                                                                                          
    key <104> { [ KP_Enter, NoSymbol, KP_Enter ] };                                                                                                                                          
    key <105> { [ Control_R, NoSymbol, Control_R ] };                                                                                                                                        
    key <106> { [ KP_Divide, KP_Divide, KP_Divide, KP_Divide, KP_Divide, KP_Divide, XF86Ungrab ] };                                                                                          
    key <107> { [ Print, Sys_Req, Print, Sys_Req ] };                                                                                                                                        
    key <108> { [ ISO_Level3_Shift, NoSymbol, ISO_Level3_Shift ] };                                                                                                                          
    key <109> { [ Linefeed, NoSymbol, Linefeed ] };                                                                                                                                          
    key <110> { [ Home, NoSymbol, Home ] };                                                                                                                                                  
    key <111> { [ Up, NoSymbol, Up ] };                                                                                                                                                      
    key <112> { [ Prior, NoSymbol, Prior ] };                                                                                                                                                
    key <113> { [ Left, NoSymbol, Left ] };                                                                                                                                                  
    key <114> { [ Right, NoSymbol, Right ] };                                                                                                                                                
    key <115> { [ End, NoSymbol, End ] };                                                                                                                                                    
    key <116> { [ Down, NoSymbol, Down ] };                                                                                                                                                  
    key <117> { [ Next, NoSymbol, Next ] };                                                                                                                                                  
    key <118> { [ Insert, NoSymbol, Insert ] };                                                                                                                                              
    key <119> { [ Delete, NoSymbol, Delete ] };                                                                                                                                              
    key <121> { [ XF86AudioMute, NoSymbol, XF86AudioMute ] };                                                                                                                                
    key <122> { [ XF86AudioLowerVolume, NoSymbol, XF86AudioLowerVolume ] };                                                                                                                  
    key <123> { [ XF86AudioRaiseVolume, NoSymbol, XF86AudioRaiseVolume ] };                                                                                                                  
    key <124> { [ XF86PowerOff, NoSymbol, XF86PowerOff ] };                                                                                                                                  
    key <125> { [ KP_Equal, NoSymbol, KP_Equal ] };                                                                                                                                          
    key <126> { [ plusminus, NoSymbol, plusminus ] };                                                                                                                                        
    key <127> { [ Pause, Break, Pause, Break ] };                                                                                                                                            
    key <128> { [ XF86LaunchA, NoSymbol, XF86LaunchA ] };                                                                                                                                    
    key <129> { [ KP_Decimal, KP_Decimal, KP_Decimal, KP_Decimal ] };                                                                                                                        
    key <130> { [ Hangul, NoSymbol, Hangul ] };                                                                                                                                              
    key <131> { [ Hangul_Hanja, NoSymbol, Hangul_Hanja ] };                                                                                                                                  
    key <133> { [ Super_L, NoSymbol, Super_L ] };                                                                                                                                            
    key <134> { [ Super_R, NoSymbol, Super_R ] };                                                                                                                                            
    key <135> { [ Menu, NoSymbol, Menu ] };                                                                                                                                                  
    key <136> { [ Cancel, NoSymbol, Cancel ] };                                                                                                                                              
    key <137> { [ Redo, NoSymbol, Redo ] };                                                                                                                                                  
    key <138> { [ SunProps, NoSymbol, SunProps ] };                                                                                                                                          
    key <139> { [ Undo, NoSymbol, Undo ] };                                                                                                                                                  
    key <140> { [ SunFront, NoSymbol, SunFront ] };                                                                                                                                          
    key <141> { [ XF86Copy, NoSymbol, XF86Copy ] };                                                                                                                                          
    key <142> { [ XF86Open, NoSymbol, XF86Open ] };                                                                                                                                          
    key <143> { [ XF86Paste, NoSymbol, XF86Paste ] };                                                                                                                                        
    key <144> { [ Find, NoSymbol, Find ] };                                                                                                                                                  
    key <145> { [ XF86Cut, NoSymbol, XF86Cut ] };                                                                                                                                            
    key <146> { [ Help, NoSymbol, Help ] };                                                                                                                                                  
    key <147> { [ XF86MenuKB, NoSymbol, XF86MenuKB ] };                                                                                                                                      
    key <148> { [ XF86Calculator, NoSymbol, XF86Calculator ] };                                                                                                                              
    key <150> { [ XF86Sleep, NoSymbol, XF86Sleep ] };                                                                                                                                        
    key <151> { [ XF86WakeUp, NoSymbol, XF86WakeUp ] };                                                                                                                                      
    key <152> { [ XF86Explorer, NoSymbol, XF86Explorer ] };                                                                                                                                  
    key <153> { [ XF86Send, NoSymbol, XF86Send ] };                                                                                                                                          
    key <155> { [ XF86Xfer, NoSymbol, XF86Xfer ] };                                                                                                                                          
    key <156> { [ XF86Launch1, NoSymbol, XF86Launch1 ] };                                                                                                                                    
    key <157> { [ XF86Launch2, NoSymbol, XF86Launch2 ] };                                                                                                                                    
    key <158> { [ XF86WWW, NoSymbol, XF86WWW ] };                                                                                                                                            
    key <159> { [ XF86DOS, NoSymbol, XF86DOS ] };                                                                                                                                            
    key <160> { [ XF86ScreenSaver, NoSymbol, XF86ScreenSaver ] };                                                                                                                            
    key <161> { [ XF86RotateWindows, NoSymbol, XF86RotateWindows ] };                                                                                                                        
    key <162> { [ XF86TaskPane, NoSymbol, XF86TaskPane ] };                                                                                                                                  
    key <163> { [ XF86Mail, NoSymbol, XF86Mail ] };                                                                                                                                          
    key <164> { [ XF86Favorites, NoSymbol, XF86Favorites ] };                                                                                                                                
    key <165> { [ XF86MyComputer, NoSymbol, XF86MyComputer ] };                                                                                                                              
    key <166> { [ XF86Back, NoSymbol, XF86Back ] };                                                                                                                                          
    key <167> { [ XF86Forward, NoSymbol, XF86Forward ] };                                                                                                                                    
    key <169> { [ XF86Eject, NoSymbol, XF86Eject ] };                                                                                                                                        
    key <170> { [ XF86Eject, XF86Eject, XF86Eject, XF86Eject ] };                                                                                                                            
    key <171> { [ XF86AudioNext, NoSymbol, XF86AudioNext ] };                                                                                                                                
    key <172> { [ XF86AudioPlay, XF86AudioPause, XF86AudioPlay, XF86AudioPause ] };                                                                                                          
    key <173> { [ XF86AudioPrev, NoSymbol, XF86AudioPrev ] };                                                                                                                                
    key <174> { [ XF86AudioStop, XF86Eject, XF86AudioStop, XF86Eject ] };                                                                                                                    
    key <175> { [ XF86AudioRecord, NoSymbol, XF86AudioRecord ] };                                                                                                                            
    key <176> { [ XF86AudioRewind, NoSymbol, XF86AudioRewind ] };                                                                                                                            
    key <177> { [ XF86Phone, NoSymbol, XF86Phone ] };                                                                                                                                        
    key <179> { [ XF86Tools, NoSymbol, XF86Tools ] };                                                                                                                                        
    key <180> { [ XF86HomePage, NoSymbol, XF86HomePage ] };                                                                                                                                  
    key <181> { [ XF86Reload, NoSymbol, XF86Reload ] };                                                                                                                                      
    key <182> { [ XF86Close, NoSymbol, XF86Close ] };                                                                                                                                        
    key <185> { [ XF86ScrollUp, NoSymbol, XF86ScrollUp ] };                                                                                                                                  
    key <186> { [ XF86ScrollDown, NoSymbol, XF86ScrollDown ] };                                                                                                                              
    key <187> { [ parenleft, NoSymbol, parenleft ] };                                                                                                                                        
    key <188> { [ parenright, NoSymbol, parenright ] };                                                                                                                                      
    key <189> { [ XF86New, NoSymbol, XF86New ] };                                                                                                                                            
    key <190> { [ Redo, NoSymbol, Redo ] };                                                                                                                                                  
    key <191> { [ XF86Tools, NoSymbol, XF86Tools ] };                                                                                                                                        
    key <192> { [ XF86Launch5, NoSymbol, XF86Launch5 ] };                                                                                                                                    
    key <193> { [ XF86Launch6, NoSymbol, XF86Launch6 ] };                                                                                                                                    
    key <194> { [ XF86Launch7, NoSymbol, XF86Launch7 ] };                                                                                                                                    
    key <195> { [ XF86Launch8, NoSymbol, XF86Launch8 ] };                                                                                                                                    
    key <196> { [ XF86Launch9, NoSymbol, XF86Launch9 ] };                                                                                                                                    
    key <198> { [ XF86AudioMicMute, NoSymbol, XF86AudioMicMute ] };                                                                                                                          
    key <199> { [ XF86TouchpadToggle, NoSymbol, XF86TouchpadToggle ] };                                                                                                                      
    key <200> { [ XF86TouchpadOn, NoSymbol, XF86TouchpadOn ] };                                                                                                                              
    key <201> { [ XF86TouchpadOff, NoSymbol, XF86TouchpadOff ] };                                                                                                                            
    key <203> { [ Mode_switch, NoSymbol, Mode_switch ] };                                                                                                                                    
    key <204> { [ NoSymbol, Alt_L, NoSymbol, Alt_L ] };                                                                                                                                      
    key <205> { [ NoSymbol, Meta_L, NoSymbol, Meta_L ] };                                                                                                                                    
    key <206> { [ NoSymbol, Super_L, NoSymbol, Super_L ] };                                                                                                                                  
    key <207> { [ NoSymbol, Hyper_L, NoSymbol, Hyper_L ] };                                                                                                                                  
    key <208> { [ XF86AudioPlay, NoSymbol, XF86AudioPlay ] };                                                                                                                                
    key <209> { [ XF86AudioPause, NoSymbol, XF86AudioPause ] };                                                                                                                              
    key <210> { [ XF86Launch3, NoSymbol, XF86Launch3 ] };                                                                                                                                    
    key <211> { [ XF86Launch4, NoSymbol, XF86Launch4 ] };                                                                                                                                    
    key <212> { [ XF86LaunchB, NoSymbol, XF86LaunchB ] };                                                                                                                                    
    key <213> { [ XF86Suspend, NoSymbol, XF86Suspend ] };                                                                                                                                    
    key <214> { [ XF86Close, NoSymbol, XF86Close ] };                                                                                                                                        
    key <215> { [ XF86AudioPlay, NoSymbol, XF86AudioPlay ] };                                                                                                                                
    key <216> { [ XF86AudioForward, NoSymbol, XF86AudioForward ] };                                                                                                                          
    key <218> { [ Print, NoSymbol, Print ] };                                                                                                                                                
    key <220> { [ XF86WebCam, NoSymbol, XF86WebCam ] };                                                                                                                                      
    key <221> { [ XF86AudioPreset, NoSymbol, XF86AudioPreset ] };                                                                                                                            
    key <223> { [ XF86Mail, NoSymbol, XF86Mail ] };                                                                                                                                          
    key <224> { [ XF86Messenger, NoSymbol, XF86Messenger ] };                                                                                                                                
    key <225> { [ XF86Search, NoSymbol, XF86Search ] };                                                                                                                                      
    key <226> { [ XF86Go, NoSymbol, XF86Go ] };                                                                                                                                              
    key <227> { [ XF86Finance, NoSymbol, XF86Finance ] };                                                                                                                                    
    key <228> { [ XF86Game, NoSymbol, XF86Game ] };                                                                                                                                          
    key <229> { [ XF86Shop, NoSymbol, XF86Shop ] };                                                                                                                                          
    key <231> { [ Cancel, NoSymbol, Cancel ] };                                                                                                                                              
    key <232> { [ XF86MonBrightnessDown, NoSymbol, XF86MonBrightnessDown ] };                                                                                                                
    key <233> { [ XF86MonBrightnessUp, NoSymbol, XF86MonBrightnessUp ] };                                                                                                                    
    key <234> { [ XF86AudioMedia, NoSymbol, XF86AudioMedia ] };                                                                                                                              
    key <235> { [ XF86Display, NoSymbol, XF86Display ] };                                                                                                                                    
    key <236> { [ XF86KbdLightOnOff, NoSymbol, XF86KbdLightOnOff ] };                                                                                                                        
    key <237> { [ XF86KbdBrightnessDown, NoSymbol, XF86KbdBrightnessDown ] };                                                                                                                
    key <238> { [ XF86KbdBrightnessUp, NoSymbol, XF86KbdBrightnessUp ] };                                                                                                                    
    key <239> { [ XF86Send, NoSymbol, XF86Send ] };                                                                                                                                          
    key <240> { [ XF86Reply, NoSymbol, XF86Reply ] };                                                                                                                                        
    key <241> { [ XF86MailForward, NoSymbol, XF86MailForward ] };                                                                                                                            
    key <242> { [ XF86Save, NoSymbol, XF86Save ] };                                                                                                                                          
    key <243> { [ XF86Documents, NoSymbol, XF86Documents ] };                                                                                                                                
    key <244> { [ XF86Battery, NoSymbol, XF86Battery ] };
    key <245> { [ XF86Bluetooth, NoSymbol, XF86Bluetooth ] };
    key <246> { [ XF86WLAN, NoSymbol, XF86WLAN ] };
    key <251> { [ XF86MonBrightnessCycle, NoSymbol, XF86MonBrightnessCycle ] };
    key <254> { [ XF86WWAN, NoSymbol, XF86WWAN ] };
    key <255> { [ XF86RFKill, NoSymbol, XF86RFKill ] };
    key <92> { [ f24 ] };
    key <92> { [ f23 ] };
};
6.87735 DEBUG: pid 774710, injector.py, line 165, Grabbing "/dev/input/event6" because of "Key((1, 275, 1),)"
6.87744 DEBUG: pid 774710, injector.py, line 189, Grab /dev/input/event6
6.99975 DEBUG: pid 774710, numlock.py, line 73, numlockx not found
7.00044 DEBUG: pid 774710, injector.py, line 415, Started consumer to inject to /dev/input/event6, fd 33
7.55228 INFO: xkb.py, line 105, Applying xkb configuration
7.56168 DEBUG: xkb.py, line 118, Running "setxkbmap -keycodes key-mapper-keycodes -symbols key-mapper/Corsair_CORSAIR_HARPOON_RGB_WIRELESS_Gaming_Dongle -device 18"
7.56523 INFO: window.py, line 627, Device "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle" is currently mapped
12.3041 SPAM: pid 774710, keycode_mapper.py, line 435, ((1, 272, 1)) ----------------- forwarding
12.4150 SPAM: pid 774710, keycode_mapper.py, line 367, ((1, 272, 0)) ----------------- forwarding release
18.5580 SPAM: pid 774710, keycode_mapper.py, line 435, ((1, 272, 1)) ----------------- forwarding
18.6541 SPAM: pid 774710, keycode_mapper.py, line 367, ((1, 272, 0)) ----------------- forwarding release
21.1191 SPAM: pid 774710, keycode_mapper.py, line 430, ((1, 275, 1)) ----------------- maps to 84
21.2721 SPAM: pid 774710, keycode_mapper.py, line 363, ((1, 275, 0)) ----------------- releasing 84
23.1171 SPAM: pid 774710, keycode_mapper.py, line 430, ((1, 276, 1)) ----------------- maps to 84
23.2901 SPAM: pid 774710, keycode_mapper.py, line 363, ((1, 276, 0)) ----------------- releasing 84
36.0191 SPAM: pid 774710, keycode_mapper.py, line 435, ((1, 272, 1)) ----------------- forwarding
36.1341 SPAM: pid 774710, keycode_mapper.py, line 367, ((1, 272, 0)) ----------------- forwarding release
36.1412 INFO: injector.py, line 146, Stopping injecting keycodes for device "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle"
36.1417 DEBUG: pid 774710, injector.py, line 296, Received close signal
36.1419 DEBUG: pid 774710, injector.py, line 396, asyncio coroutines ended
36.1450 DEBUG: numlock.py, line 73, numlockx not found
46.3431 DEBUG: window.py, line 260, Closing window
46.3435 DEBUG: reader.py, line 105, Sending close msg to reader
46.3437 DEBUG: reader.py, line 215, Reader stopped
46.3509 INFO: daemon.py, line 456, Stopping all injections
46.3562 INFO: injector.py, line 146, Stopping injecting keycodes for device "Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle"
46.3598 DEBUG: numlock.py, line 73, numlockx not found
46.3600 DEBUG: window.py, line 260, Closing window

(key-mapper-gtk:774699): Gtk-CRITICAL **: 17:36:11.177: gtk_main_quit: assertion 'main_loops != NULL' failed
[user]@kubuntu:~$

@sezanzeb
Copy link
Owner

sezanzeb commented Mar 4, 2021

    key <92> { [ f24 ] };
    key <92> { [ f23 ] };

looks broken. I'll investigate that at some point. Busy with some other stuff

sezanzeb pushed a commit that referenced this issue Mar 28, 2021
@sezanzeb
Copy link
Owner

sezanzeb commented Mar 28, 2021

pleasy try the xkb branch again

ccedilla is correctly detected in a game I just ran via wine, but f24 is not. I wonder if there are limitations in wine

@sezanzeb
Copy link
Owner

(pushed more relevant changes to xkb, please pull them if you are already checking it out)

@mauritzn
Copy link
Author

I was still unable to get ccedilla or F13-F24 working, lower F keys still seem to work, using https://keycode.info/ it also seems that ccedilla and F23 show up as the same entry if the same key <number> has been used in the xkb_symbols config, aka if in the config ccedilla is set as key <97>, and then I replace that mapping with F23 and it get the same key <97> mapping it shows up as the same key in keycode.info.

For me on keycode.info the keys always show up as:

F24: 226 (IntlRo) [in xkb: key <93>]
F23: 244 (Lang5) [in xkb: key <97>]

From what I remember when I did this mapping manually on Linux with xkb it did work fine with F23 & F24 in Wine games (I know for a fact that it worked in World of Warcraft at least, because that was the main reason why I had it) and it showed up correctly in keycode.info as F23 & F24. I'm sorry that I cannot remember how I configured it back then and that I do not have a copy of the config file from back then...

Any ideas of what could be the problem?

>> Key-mapper debug log <<

@sezanzeb
Copy link
Owner

thanks. the xkb config looks much better now

are you on wayland or X11? echo $XDG_SESSION_TYPE

@sezanzeb
Copy link
Owner

sezanzeb commented Mar 29, 2021

under the line saying "Applying xkb configuration" there is a command shown with a -device parameter.

please check if the id is that of the correct device ending in "mapped" via xinput list

then use this id to run xkbcomp -i 18 $DISPLAY out.xkb and afterwards check if ccedilla is there via cat out.xkb | grep ccedilla (https://wiki.archlinux.org/index.php/X_keyboard_extension#Debugging_XKB)

you could also use xev to check the xkb mapping of your keys


furthermore you could

  • disable key-mappers mapping
  • use xev to figure out the codes of any of your keys
  • insert that code in the symbols file (path shown in logs)
  • apply that file with a setxkbmap command similar to what is shown in the logs

and see if you can get it to work like that. Make sure to provide a -device parameter that is not your main keyboard, otherwise your keyboard will not be usable anymore.

@mauritzn
Copy link
Author

I am running X11 (KDE), Kubuntu 20.04.2.

xinput list: (the id after "Applying xkb configuration" seems to match)

[user]@kubuntu:~$ xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle        id=13   [slave  pointer  (2)]
⎜   ↳ key-mapper Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle forwarded   id=19   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Cooler Master Technology Inc. AMD SR4 lamplight Control   id=8    [slave  keyboard (3)]
    ↳ Cooler Master Technology Inc. AMD SR4 lamplight Control System Control    id=9    [slave  keyboard (3)]
    ↳ Cooler Master Technology Inc. AMD SR4 lamplight Control Consumer Control  id=10   [slave  keyboard (3)]
    ↳ Aureon 7.1 USB                            id=11   [slave  keyboard (3)]
    ↳ HD Pro Webcam C920                        id=12   [slave  keyboard (3)]
    ↳ Metadot - Das Keyboard Das Keyboard       id=14   [slave  keyboard (3)]
    ↳ Metadot - Das Keyboard Das Keyboard System Control        id=15   [slave  keyboard (3)]
    ↳ Metadot - Das Keyboard Das Keyboard Consumer Control      id=16   [slave  keyboard (3)]
    ↳ Eee PC WMI hotkeys                        id=17   [slave  keyboard (3)]
    ↳ key-mapper Corsair CORSAIR HARPOON RGB WIRELESS Gaming Dongle mapped      id=18   [slave  keyboard (3)]

ccedilla did not appear in out.xkb create from xkbcomp.


Output from xev on key usage:

MappingNotify event, serial 40, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 40, synthetic NO, window 0xa400001,
    root 0x1e6, subw 0x0, time 232965438, (100,113), root:(100,142),
    state 0x10, keycode 93 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0xa400001,
    root 0x1e6, subw 0x0, time 232965594, (100,113), root:(100,142),
    state 0x10, keycode 93 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 41, synthetic NO, window 0xa400001,
    root 0x1e6, subw 0x0, time 232971250, (100,113), root:(100,142),
    state 0x10, keycode 97 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0xa400001,
    root 0x1e6, subw 0x0, time 232971505, (100,113), root:(100,142),
    state 0x10, keycode 97 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

@sezanzeb
Copy link
Owner

sezanzeb commented Mar 29, 2021

does setxkbmap us change anything? maybe its just completely broken on your system (just like on my other ubuntu wayland machine)

I wonder if this project has anything to do with the problem https://github.com/xkbcommon/libxkbcommon? Can you please check if any libxkbcommon packages are installed?

@sezanzeb
Copy link
Owner

sezanzeb commented Mar 29, 2021

sounds like I will never support the xkb stuff after all... xkbcommon/libxkbcommon#223 (comment)

the only way I would be willing to maintain that would be via plugins. There could be my own xkb plugin and one for gnome and kde maintained by other people

but I didn't come up with a smart way for plugins yet, especially since the root daemon should never execute plugins that can be modified by unprivileged users.

@sezanzeb
Copy link
Owner

does removing /var/lib/xkb/*.xkm files help? see https://askubuntu.com/a/334100

@mauritzn
Copy link
Author

mauritzn commented Mar 29, 2021

From what I could find using apt list the following packages with libxkbcommon are installed:

libxkbcommon-dev/focal 0.10.0-1 amd64
libxkbcommon-dev/focal 0.10.0-1 i386
libxkbcommon-doc/focal,focal 0.10.0-1 all
libxkbcommon-x11-0/focal,now 0.10.0-1 amd64 [installed,automatic]
libxkbcommon-x11-0/focal 0.10.0-1 i386
libxkbcommon-x11-dev/focal 0.10.0-1 amd64
libxkbcommon-x11-dev/focal 0.10.0-1 i386
libxkbcommon0/focal,now 0.10.0-1 amd64 [installed,automatic]
libxkbcommon0/focal,now 0.10.0-1 i386 [installed,automatic]

To be honest I am very hesitant to play around much more with xkb considering that this is my main machine and would not like to break anything, especially since getting F13-F24 working is not that much of a requirement, since I have other workarounds theses days that I can use

@mauritzn
Copy link
Author

/var/lib/xkb only contains one file for me and that is: README.compiled

@dtruesdale88
Copy link

I may be of help with this, I am using Corsairs K68 RGB Keyboard with CKB. I have remapped the left windows key to F24.

Now your asking yourself what does this have to do with Key Mapper, well I have the Razer Tartarus V2 and have mapped the button on the thumb postion to F24 and it works for push to talk in Discord the same as the Keyboard using F24. The funny thing is when you push the button to set it in Discord it shows up as UNK202.

I am very grateful for this Key Mapper. I can set keys on the Tartarus V2 separate of my keyboard. The only feature I see a need for and this is more for the Tartarus is Keymap switching since it has 2 other modes that I have not figured out how to setup or access. Again thank you for a great program.

@sezanzeb
Copy link
Owner

sezanzeb commented Apr 4, 2021

does writing ccedilla with that method work: https://github.com/sezanzeb/key-mapper/blob/main/readme/usage.md#how-to-use-unavailable-characters ?

it's in some ways similar to what the xkb branch does

@mauritzn
Copy link
Author

mauritzn commented Apr 7, 2021

wow... that works, got ccedilla and F24 working, it was a bit odd though, it didn't work at first but then started working and then one time it just suddenly stopped working until i ran xmodmap keyboard_layout again, but yeah it does work, both ccedilla and F24 are recognized correctly in Minecraft, some games still didn't like F24 but seems it is a problem on the games side, since ccedilla still worked in those. Tried it in a few games running through Wine as well and had no problems.

Everytime I ran xmodmap keyboard_layout my OS froze for a good while and was running slow for quite a while after, it does seem to pass after a while, but did give me a good scare ':D

This testing was done on the latest release 0.8.1.

Everything looks great in xev as well:

KeyPress event, serial 41, synthetic NO, window 0x7000001,
    root 0x1e6, subw 0x0, time 1763195, (903,683), root:(903,712),
    state 0x10, keycode 93 (keysym 0xe7, ccedilla), same_screen YES,
    XLookupString gives 2 bytes: (c3 a7) "ç"
    XmbLookupString gives 2 bytes: (c3 a7) "ç"
    XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0x7000001,
    root 0x1e6, subw 0x0, time 1763422, (901,683), root:(901,712),
    state 0x10, keycode 93 (keysym 0xe7, ccedilla), same_screen YES,
    XLookupString gives 2 bytes: (c3 a7) "ç"
    XFilterEvent returns: False

KeyPress event, serial 41, synthetic NO, window 0x7000001,
    root 0x1e6, subw 0x0, time 1768263, (901,683), root:(901,712),
    state 0x10, keycode 97 (keysym 0xffd5, F24), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0x7000001,
    root 0x1e6, subw 0x0, time 1768586, (901,683), root:(901,712),
    state 0x10, keycode 97 (keysym 0xffd5, F24), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

@sezanzeb
Copy link
Owner

sezanzeb commented Apr 8, 2021

ok, great. Glad at least that worked out

I'll close this and gather relevant information in a separate issue for a plugins feature. Maybe the xkb branch code is not lost that way, and maybe there could also be an xmodmap plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants