Skip to content

Instantly share code, notes, and snippets.

@ChrisVilches
Last active September 29, 2022 09:41
Show Gist options
  • Save ChrisVilches/678c20fb2e4dc531c96d2db7819e9a2b to your computer and use it in GitHub Desktop.
Save ChrisVilches/678c20fb2e4dc531c96d2db7819e9a2b to your computer and use it in GitHub Desktop.
(Ubuntu) Use arrows without leaving home row.
#!/usr/bin/env bash
# Use this to reset the layout.
setxkbmap -layout jp
# Tip: Use 'xev' to get keycodes.
# Set modifier.
# Menu key = 135
# Caps Lock = 66
xmodmap -e "keycode 66 = Mode_switch"
# Arrow keys
xmodmap -e "keycode 31 = i I Up I"
xmodmap -e "keycode 44 = j J Left J"
xmodmap -e "keycode 45 = k K Down K"
xmodmap -e "keycode 46 = l L Right L"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment