final version V2
This commit is contained in:
@@ -7,6 +7,7 @@ This document will explain how to setup g910-gkeys by limiting as much as possib
|
||||
~g910-gkeys~ allows different actions : ~typeout~, ~shortcut~ and ~run~. There are some drawbacks with that :
|
||||
- All of these actions will be performed on the process environment, that is ~root~.
|
||||
- These actions are *global*.
|
||||
- The actions (especially ~run~) will be performed even when the user is not logged-on.
|
||||
- It is impossible to use the G-keys as /normal/ keys (for example different actions with different modifiers, for example ~Shift-G1~ or ~Control-Meta-G1~).
|
||||
|
||||
** g910-gkeys configuration file (/etc/g910-gkeys/config.json)
|
||||
@@ -18,7 +19,7 @@ My ~g910-gkeys~ is :
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"__comment": "I was sometimes unable to use F20, even xev does did not show the keycode (It just muted/unmuted sound, same as the G910's <mute> button). If it is the case for you, just skip F20 and use F22 instead.",
|
||||
"__comment": "I was sometimes unable to use F20, even xev did not show the keycode (It just muted/unmuted sound, same as the G910's <mute> button). If it is the case for you, just skip F20 and use F22 instead.",
|
||||
"keyboard_mapping": "en",
|
||||
"g1": {
|
||||
"hotkey_type": "shortcut",
|
||||
@@ -60,7 +61,7 @@ My ~g910-gkeys~ is :
|
||||
#+END_SRC
|
||||
|
||||
** X11 keyboard mapping
|
||||
/*Note*: Below, I configure ~F22~ (which looks un-necessary), because I had trouble with ~F20~ at some point, and used ~F22~ as fallback.//
|
||||
/*Note*: Below, I configure ~F22~ (which looks un-necessary), because I had trouble with ~F20~ at some point, and used ~F22~ as fallback./
|
||||
|
||||
By default, the F13-F22 keys may be mapped to some defaults. For example, ~F13~ could return ~XF86Tools~.
|
||||
This is not what we want: Instead we want F13-F22 to return themselves.
|
||||
@@ -90,7 +91,7 @@ keycode 200 = XF86TouchpadOn NoSymbol XF86TouchpadOn
|
||||
#+END_SRC
|
||||
|
||||
If your configuration is incorrect, you can choose one of the two solutions below (I prefer the first one) :
|
||||
*** Fix F-keys mapping globally
|
||||
*** Solution 1: Fix F-keys mapping globally
|
||||
You will need to find out where the mapping *F-key -> Different key* is done. On my system, it was in ~/usr/share/X11/xkb/symbols/inet~.
|
||||
|
||||
To find where the mapping is done on your system, you may run : ~setxkbmap -print -verbose 10~) :
|
||||
@@ -122,7 +123,7 @@ xkb_keymap {
|
||||
};
|
||||
#+END_SRC
|
||||
|
||||
In my case, the faulty configuration was the ~inet(evdev)~ part, meaning in the ~xkb_symbols "evdev" {~ section of ~/usr/share/X11/xkb/symbols/inet~ file. I had to remove the ~FK13-FK22~ lines and add my own. For example, replacing the line :
|
||||
In my case, the faulty configuration was the ~inet(evdev)~ part on ~symbols~ line, meaning in the ~xkb_symbols "evdev" {~ section of ~/usr/share/X11/xkb/symbols/inet~ file. I had to remove the ~FK13-FK22~ lines and add my own. For example, replacing the line :
|
||||
#+BEGIN_SRC
|
||||
key <FK13> { [ XF86Tools ] };
|
||||
#+END_SRC
|
||||
@@ -159,8 +160,8 @@ $ diff -u0 inet.brsav.2022.11.13 inet
|
||||
+ key <FK21> { [ F21, F21, F21, F21 ] };
|
||||
+ key <FK22> { [ F22, F22, F22, F22 ] };
|
||||
#+END_SRC
|
||||
*** Fix F-keys mapping with .Xmodmaprc
|
||||
Add in your ~/.xmodmaprc~ :
|
||||
*** Solution 2: Fix F-keys mapping with .Xmodmaprc
|
||||
If you prefer not to touch system-wide files, you can add in your ~/.Xmodmap~ :
|
||||
#+BEGIN_SRC
|
||||
!!!!!!!!!!!!!! Logitech G910 keyboard
|
||||
! Note:
|
||||
@@ -168,7 +169,7 @@ Add in your ~/.xmodmaprc~ :
|
||||
! F21-F35 have synonyms R1-R15
|
||||
! See: /usr/include/X11/keysymdef.h
|
||||
!
|
||||
! original F13, F14, etc... mapping
|
||||
! original F13, F14, etc... mapping on my system :
|
||||
! F13 = keycode 191 = XF86Tools NoSymbol XF86Tools
|
||||
! F14 = keycode 192 = XF86Launch5 NoSymbol XF86Launch5
|
||||
! F15 = keycode 193 = XF86Launch6 NoSymbol XF86Launch6
|
||||
@@ -191,17 +192,15 @@ keycode 193 = F15 F15 F15 F15 F15 F15
|
||||
! G4
|
||||
keycode 194 = F16 F16 F16 F16 F16 F16
|
||||
! G5
|
||||
keycode 194 = F17 F17 F17 F17 F17 F17
|
||||
keycode 195 = F17 F17 F17 F17 F17 F17
|
||||
! G6
|
||||
keycode 196 = F18 F18 F18 F18 F18 F18
|
||||
! G7
|
||||
keycode 197 = F19 F19 F19 F19 F19 F19
|
||||
! F20 - problem here
|
||||
keycode 198 = F20 F20 F20 F20 F20 F20
|
||||
! G8
|
||||
keycode 199 = F21 F21 F21 F21 F21 F21
|
||||
keycode 198 = F20 F20 F20 F20 F20 F20
|
||||
! G9
|
||||
keycode 200 = F22 F22 F22 F22 F22 F22
|
||||
keycode 199 = F21 F21 F21 F21 F21 F21
|
||||
#+END_SRC
|
||||
|
||||
** User configuration
|
||||
|
Reference in New Issue
Block a user