Skip to content
Browse files

trying to figure out how to remap caps lock programmatically

  • Loading branch information...
1 parent e1e4f3d commit 362424ec3ad09e52b69291e00bb3c01b70beef7c @bjeanes committed Nov 28, 2010
Showing with 17 additions and 0 deletions.
  1. +17 −0 colemak.rb
View
17 colemak.rb
@@ -1,3 +1,20 @@
dep 'colemak', :template => 'keyboard_layout' do
+ requires 'caps lock remapped to backspace'
source "http://github.com/downloads/bjeanes/colemak/ColemakKeyboardLayouts.bundle.zip"
end
+
+dep 'caps lock remapped to backspace' do
+ requires 'PCKeyboardHack.installer', 'osx hidden binaries'
+
+ met? { false } # Not sure the best way to check that this is working
+ meet {
+ # This sets the right preference but I think we need to restart PCKeyboardHack?
+ shell 'PlistBuddy -c "Add :sysctl:enable_capslock integer 1" ~/Library/Preferences/org.pqrs.PCKeyboardHack.plist'
+ }
+end
+
+dep 'PCKeyboardHack.installer' do
+ source 'http://pqrs.org/macosx/keyremap4macbook/files/PCKeyboardHack-6.3.0.pkg.zip'
+
+ met? { "/Library/PreferencePanes/PCKeyboardHack.prefPane".p.exists? }
+end

0 comments on commit 362424e

Please sign in to comment.
Something went wrong with that request. Please try again.