Skip to content

Instantly share code, notes, and snippets.

@raphaeldussin
Last active April 26, 2019 17:30
Show Gist options
  • Select an option

  • Save raphaeldussin/0d1402532fc4e9c6a244925be59182dc to your computer and use it in GitHub Desktop.

Select an option

Save raphaeldussin/0d1402532fc4e9c6a244925be59182dc to your computer and use it in GitHub Desktop.
french apple keyboard on macbook pro running debian
# this works with the laptop's keyboard fine:
>>> more /etc/default/keyboard
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="macintosh"
XKBLAYOUT="fr"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
# however if I plug my bigger apple keyboard, keys <> and @# are reversed. So I wrote a couple of bash function
# to switch back and forth:
>>> in .bash_aliases (or .bashrc,...)
bigkeyboard() {
xmodmap -e "keycode 49 = less greater less greater lessthanequal greaterthanequal lessthanequal"
xmodmap -e "keycode 94 = at numbersign at numbersign periodcentered Ydiaeresis periodcentered"
}
smallkeyboard() {
xmodmap -e "keycode 94 = less greater less greater lessthanequal greaterthanequal lessthanequal"
xmodmap -e "keycode 49 = at numbersign at numbersign periodcentered Ydiaeresis periodcentered"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment