Created
June 9, 2011 02:12
-
-
Save hh/1015902 to your computer and use it in GitHub Desktop.
Gnome Dvorak and Us keyboard layout switcher
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
require 'gconf2' | |
@gconf = GConf::Client.default | |
#these settings drive me nuts, if you want to 'switch' between them using something like shift and capskey | |
@gconf["/desktop/gnome/peripherals/keyboard/kbd/options"]=["grp\tgrp:shift_caps_toggle",] | |
# using this next line in dvorak layout, control-e sends control-d | |
@gconf["/desktop/gnome/peripherals/keyboard/kbd/layouts"]=["us","us\tdvorak",] | |
# using this next line in us layout, control-d sends control-e | |
@gconf["/desktop/gnome/peripherals/keyboard/kbd/layouts"]=["us\tdvorak","us"] | |
# which basically means any composed keys you want to use while runing a secondary layout, use the primary layout | |
# I think this is to help memory keybindings stay the same for someone who types in mulitple languages | |
# it's not designed for people who actually use multiple physically different keyboard layouts. | |
# The option that suits me best is to only have one layout active at all, and just switch | |
# I go betwen the physical laptop keyboard and a usb Kinesis which has hardware dvorak support | |
# I need 'us' layout when using the Kinesis and 'dvorak' when using the physical laptop keyboard | |
@gconf["/desktop/gnome/peripherals/keyboard/kbd/layouts"]=["us",] # us | |
@gconf["/desktop/gnome/peripherals/keyboard/kbd/layouts"]=["us\tdvorak",] # dvorak | |
# Excericise left to the user... make a keybinding to switch layouts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment