Set elapTime to (-(round ((startTime's timeIntervalSinceNow()) * 100)) / 100.0) Set uiElem to UI elements of window pWinTitle of process pProcessName "Window: " & pWinTitle & LF & "Process: " & pProcessName Set errMsg to "Max Time of " & pMaxTimeSec & " exceeded waiting for:" & LF & ¬ If ((startTime's timeIntervalSinceNow()) > pMaxTimeSec) then Repeat until window pWinTitle of process pProcessName exists Set startTime to current application's NSDate's |date|() On pauseUntilWin(pWinTitle, pProcessName, pMaxTimeSec) Set msgTitleStr to "Remap of Modifier Keys"ĭisplay dialog msgStr with title msgTitleStr Set msgStr to "CONTROL Key has been mapped to: " & newKeyMap Tell application "System Preferences" to quit Set newKeyMap to item numDown of - UP ArrowĮnd tell - pop up button "Control (⌃) Key:"Ĭlick button "OK" - on sheet 1 (modifier key list)Įnd tell - sheet 1 - (modifier key list) If (ctrlVal contains "Command") then set numDown to 1 - for Control TOGGLE CONTROL KEY Between CONTROL & COMMAND KEY CODE. Repeat until (button "Modifier Keys…" of tab group 1) existsĬlick button "Modifier Keys…" of tab group 1 Set elapTime to my pauseUntilWin("Keyboard", "System Preferences", 1) Set elapTime to my pauseUntilWin("System Preferences", "System Preferences", 1)Ĭlick button "Keyboard" of scroll area 1 of window "System Preferences" Tell application "System Preferences" to activate Set frontApp to path to frontmost application as text Use AppleScript version "2.4" - Yosemite (10.10) or later Use smart pauseUntil handler rather than fixed delay time.I'm running macOS 10.11.6, so it might be different on Sierra. ![]() ![]() Here's an example to help get you started. This option is specially good because the command key can be used as AltGr, which helps you type special characters like áéíóúñ, which is not possible with the alternative fixes.I made a script, and I can't get it to work at the "Modifier keys." Then remember to call update-initramfs -k -all (or dracut -regenerate-all -force in Fedora) so the parameters get loaded when the module gets loaded on boot, or they will be ignored. Once you are comfortable with the configuration, you can make them permanent.Ĭreate a file like this /etc/modprobe.d/hid_nf and add your parameters like this: options hid_apple fnmode=2 swap_opt_cmd=1 First check the existing parameters with modinfo hid_apple and then modify them on the fly: echo 2 > /sys/module/hid_apple/parameters/fnmodeĮcho 1 > /sys/module/hid_apple/parameters/swap_opt_cmdĮcho 1 > /sys/module/hid_apple/parameters/swap_fn_leftctrl To play around with the parameters you can change them live. (I don't know if this is required, but I did it.)Īnother solution which does NOT involve Xmodmap, nor depends on gnome-tweaks is to instruct the module to swap them. The extra key on many European keyboards: Xmodmap doesn't work universally in all apps, gnome tweak tool lacked the function, dconf editing a custom altwin2 key swap (like the main answer here) failed, so I was tearing my hair out until I combined several answers into this complete, simple, and elegant solution: gksudo gedit /usr/share/X11/xkb/symbols/pcĬhange it to: default partial alphanumeric_keys modifier_keys In 16.04, here's the way I finally got this to work. Duplicate of How to swap Command and Control keys with xkb step by step?
0 Comments
Leave a Reply. |