-
-
Save image72/34cd5031e42a5be70e8bcb6eb0333fb6 to your computer and use it in GitHub Desktop.
A command to get the keycodes of your keyboard and configure your ~/.Xmodmap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# A command to get the keycodes of your keyboard and configure your ~/.Xmodmap | |
# I used that for configure my multimedia-keys on XFCE4 @ Manjaro | |
xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p' | |
# [e.g.: ~/.Xmodmap | |
# keycode 162 = XF86AudioPlay | |
# keycode 164 = XF86AudioStop | |
# keycode 160 = XF86AudioMute | |
# keycode 144 = XF86AudioPrev | |
# keycode 153 = XF86AudioNext | |
# keycode 176 = XF86AudioRaiseVolume | |
# keycode 174 = XF86AudioLowerVolume | |
# keycode 237 = XF86AudioMedia | |
# keycode 230 = XF86Favorites | |
# keycode 236 = XF86Mail | |
# keycode 178 = XF86WWW |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment