- install xorg-xev: sudo pacman -S xorg-xev
- run xev
- in the window press the key you want to remap and look in the terminal what's the value for "keycode" (for me it was keycode=105)
KeyPress event, serial 34, synthetic NO, window 0x3e00001,
root 0x167, subw 0x0, time 396542, (376,252), root:(459,402),
state 0x10, keycode 105 (keysym 0x3c, less), same_screen YES,
XKeysymToKeycode returns keycode: 94
XLookupString gives 1 bytes: (3c) "<"
XmbLookupString gives 1 bytes: (3c) "<"
XFilterEvent returns: False
- now if you want less than "<" and greater that ">" holding shift, you have to use this command:
xmodmap -e "keycode 105 = less greater less greater bar brokenbar lessthanequal greaterthanequal"
- this change is only available during the user's session, after a restart you'd have to type it again.
- if like me you're using Gnome 3 (gnome-shell) you should add a new .desktop file in ~/.config/autostart to execute a script containing the command at each startup of the gnome session.
- for example create ~/scripts/keyboardRemapKey.sh with
#!/bin/bash
xmodmap -e "keycode 105 = less greater less greater bar brokenbar lessthanequal greaterthanequal"
- then create ~/.config/autostart/keyboardRemapKey.desktop with
[Desktop Entry]
Name=Keyboard remap
GenericName=Keyboard remap "less key" at startup
Comment=Keyboard remap "less key" at startup
Exec=/home/user/scripts/keyboardRemapLessKeyAtStartup.sh
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true
and the change will be permanent.
//TODO: add some config files in
https://www.freedesktop.org/wiki/Software/XKeyboardConfig/Development/
https://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html
https://michal.kosmulski.org/computing/articles/custom-keyboard-layouts-xkb.html
Inscription à :
Publier les commentaires (Atom)
bash script to convert all mp4 in a folder to mkv files with ffmpeg
#!/bin/bash for i in *.mp4; do echo "$i" "${i%%.*}.mkv" ffmpeg -i "$i" -vcodec copy -acodec copy "${...
-
When I installed Manjaro I choose "minimal installation" so only the most basic packages are installed on my system by default. B...
-
Last time this happened, I freaked out, after a couple of hours I was able to get it back to normal by following those steps: install a newe...
-
#!/bin/bash for i in *.mp4; do echo "$i" "${i%%.*}.mkv" ffmpeg -i "$i" -vcodec copy -acodec copy "${...
Aucun commentaire:
Enregistrer un commentaire