Does anyone know where OSX stores the settings in System Preferences > Keyboard > Modifier Keys? -
i'm apparently not 1 wants know (how can change modifier keys in "system preferences > keyboard > modifier keys..."). i've tried watching system preferences app dtruss, doesn't seem possible on 10.10.3 (which i'm on right now), , i'm not sure that @ useful if system preferences getting settings cfprefsd. watching cfprefsd dtruss doesn't seem catch relevant file access.
does know of api information? in gestalt perhaps?
ok - answering own question. threw little program uses kqueues watch file system changes. watched file system modifications when changed setting in system preferences, , saw:
'/users/ted/library/preferences/byhost/.globalpreferences.3f1c...9c34.plist.v1ut9hp' kevent: ident=44, filter=kq_filter_vnode, flags=kq_ev_add|kq_ev_clear, fflags=kq_note_write|kq_note_child|kq_note_pdatamask
so setting in ~/library/preferences/byhost/.globalpreferences.<uuid>.plist
. i'm not sure uuid - opendirectory? (update: apparently uuid identifier machine).
anyways, in .globalpreferences.<uuid>.plist
, see entries like:
<key>com.apple.keyboard.modifiermapping.1452-610-0</key> <array> <dict> <key>hidkeyboardmodifiermappingdst</key> <integer>2</integer> <key>hidkeyboardmodifiermappingsrc</key> <integer>0</integer> </dict> </array>
1452:610 decimal vid:pid usb keyboard/trackpad combo in 2012 macbook pro, , other keyboard that's been plugged in computer , has had modifier settings remapped have similar entry. 0
seems caps lock key, 2
, 10
seem left , right ctrl, 3
, 11
seem left , right option, , 4
, 12
seem left , right command.
so above, can see have caps lock key mapped left ctrl.
it looks settings in .globalpreferences.<uuid>.plist
part of standard user defaults. can @ these settings enough doing
[[nsuserdefaults standarduserdefaults] objectforkey:@"com.apple.keyboard.modifiermapping-1452-610-0"];