MacOS - chunhualiao/public-docs GitHub Wiki
swap_ctrl_command_all.sh
#!/bin/bash
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x7000000E0,"HIDKeyboardModifierMappingDst":0x7000000E3},{"HIDKeyboardModifierMappingSrc":0x7000000E3,"HIDKeyboardModifierMappingDst":0x7000000E0}]}'
Windows Keyboard: Home and End Key
For the built-in macOS Terminal (Terminal.app): Open Terminal and go to Terminal > Settings... (or Preferences...).
- Select the Profiles tab and choose the profile you use (e.g., "Basic").
- Click on the Keyboard sub-tab.
- In the list of keys, find the "home" key.
- If it's not there, click the + button to add it. Select "home" from the "Key" dropdown.
- Double-click the "Action" column for the "home" key.
- Change the action to "Send Text".
- In the text box, type the escape sequence \001.
Press Enter and close the settings window.
You can fix it using the same method:
- The standard shell command for "end of line" is Control + E.
- The character sequence for Control + E is \005.
Disabe clicking desktop to hide all windows
osascript myscript.scpt
tell application "System Settings"
activate
delay 1 -- Wait for System Settings to open
end tell
tell application "System Events"
tell process "System Settings"
-- Navigate to Desktop & Dock
tell menu bar 1
tell menu bar item "View"
tell menu "View"
click menu item "Desktop & Dock"
end tell
end tell
end tell
delay 1 -- Wait for Desktop & Dock pane to load
-- Access Desktop & Stage Manager section
tell window "Desktop & Dock"
tell scroll area 1
tell group 1
-- Set "Click wallpaper to reveal desktop" to "Only in Stage Manager"
tell pop up button 1
click
tell menu 1
click menu item "Only in Stage Manager"
end tell
end tell
delay 0.5
-- Ensure Stage Manager is turned off
tell button "Turn On" -- If Stage Manager is off, button says "Turn On"
if exists then
-- Stage Manager is already off, no action needed
else
-- Stage Manager is on, click to turn it off
tell button "Turn Off"
if exists then
click
end if
end tell
end if
end tell
end tell
end tell
end tell
end tell
end tell
tell application "System Settings"
quit
end tell
copy to Finder -> Applications
- try to open it once
Check Security & Privacy Settings:
- In some cases, you might need to adjust your Security & Privacy settings.
- Go to System Settings (or System Preferences).
- Click "Privacy & Security."
- In the "Security" section, you might see a message about the blocked app. You may have the option to "Open Anyway."