Skip to main content
Share Your Experience: Take the 2024 Developer Survey
88 votes

Tilde (~) and plus-minus (±) in wrong place on keyboard

Here’s a solution that does not use any external tools. Run this in Terminal.app: sudo hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000035,"...
CBlew's user avatar
  • 1,001
83 votes
Accepted

How do I remap a key in macOS Sierra, e.g., Right Alt to Right Control?

Apple's Technical Note TN2450 describes how to remap keys. Running the following command will remap Right Alt to be Right Control. hidutil property --set '{"UserKeyMapping": [{"...
Steven C. Howell's user avatar
75 votes

Type Lambda λ on a Mac?

Press Command ⌘+Control ⌃+Space. Type lamda into the search bar. Pay attention to type lamda instead of lambda. Your lamda should be there: You might ask why it is spelt lamda not lambda. According ...
Mateusz Piotrowski's user avatar
74 votes
Accepted

How do I do Home and End in iterm2?

^ ControlA and ^ ControlE are keybinding in Bash and ZSH, not in iTerm (or Terminal). If you want custom bindings within iTerm, you will need to bind the actual keyboard sequence in the keybinding. "...
Allan's user avatar
  • 103k
58 votes

How do I do Home and End in iterm2?

The accepted solution proposed by Allan is not optimal, as this keybinding affects *ALL* applications that are executed on the terminal and this key remapping would mean that some applications won't ...
tvs's user avatar
  • 681
41 votes

How to lock the iPad's screen with a keyboard shortcut?

I was able to figure out Control + Command + Q seems to work on the new iPad Pro keyboard to lock it.
Rp17's user avatar
  • 411
36 votes

How do I remap a key in macOS Sierra, e.g., Right Alt to Right Control?

A more general and user-friendly approach is to use Karabiner-Elements, which is a version of Karabiner that works on Sierra.
mikaraento's user avatar
31 votes

I need to disable my main keyboard as one letter is not working and it's out of warranty

You can disable the keyboard by unloading the kernel extension with sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/ To reload, sudo ...
BaconDuctTape's user avatar
31 votes

Option and command key are switched for a keyboard on my mac?

Long press fn+o (3 seconds) to switch your keyboard layout to mac os. https://defkey.com/logitech-pop-keys-shortcuts#105067
Sarah Laftchiev's user avatar
28 votes

Tilde (~) and plus-minus (±) in wrong place on keyboard

Using Karabiner Elements, you can add a "Simple Modification" as follows: Basically, you need to know that the name of the § (±) key in Karabiner's configuration screen is non_us_backslash In my ...
Benny Powers's user avatar
27 votes

Control Spotify with Media Keys

If nothing helps to make Spotify take over the keys, check if you have Google Music installed in Chrome apps, because it always takes over these keys. Removing the Chrome app immediately makes media ...
Ogggrrr's user avatar
  • 624
27 votes
Accepted

Type Lambda λ on a Mac?

What is your reason for not wanting to switch the entire keyboard binding to Greek? If your reason was just that switching by the menu is a bit cumbersome, then you could set up a keyboard shortcut ...
PLL's user avatar
  • 987
24 votes

I need to disable my main keyboard as one letter is not working and it's out of warranty

Actually you can buy replacement keyboards online, at the very least eBay has a number of them on sale. Have a look at ifixit.com as they show how to do it and it should be able to give you an idea if ...
Steve Chambers's user avatar
23 votes

iterm - what's the key-combo to switch panes?

Here are some useful keyboard shortcuts for iTerm navigation: ⌘+← and ⌘+→ navigates among tabs. ⌘+[number] navigates directly to a tab. ⌘+⌥+[number] navigates directly to a window. ⌘+⌥+←/↑/→/↓ ...
Mohamed's user avatar
  • 331
23 votes
Accepted

Is it possible to swap option and command keys for a specific keyboard?

You can change the functions of the modifier keys (Caps Lock, Control, Option, Command) in System Preferences -> Keyboard -> Modifier Keys. If you have more than one keyboard, the setting window ...
techraf's user avatar
  • 3,988
21 votes

I need to disable my main keyboard as one letter is not working and it's out of warranty

The easiest way is to install "Karabiner Elements". Once it is installed open the "Preferences" from the menu on the right of your menu bar. Now in the bottom half of the pane you can now choose to ...
Tony Williams's user avatar
21 votes

Tilde (~) and plus-minus (±) in wrong place on keyboard

Here is Apple documentation with table containing all the keys and corresponding hexes. https://developer.apple.com/library/archive/technotes/tn2450/_index.html Initial state is no active key ...
gordey4doronin's user avatar
20 votes
Accepted

How can I choose a user an the login page without a mouse?

The clue was from activating the voice-over, which eventually tells you: Ctrl + Option + Shift + Down Arrow simultaneously followed by left/right to choose user, You don't need to activate voice ...
Billos's user avatar
  • 216
19 votes
Accepted

Any other way to move cursor to the end of line, instead of <Cmd>+<right-arrow>

I am using Ctrl+e to move to the last letter and Ctrl+a to move to the first letter. Remember that Emacs commands, work also in the Terminal.
Yoan's user avatar
  • 1,287
19 votes

How do I remap a key in macOS Sierra, e.g., Right Alt to Right Control?

This is an addendum to Steven C. Howell's answer. I have a new MacBook Pro with a Scandinavian keyboard. This new model no longer has an Esc key, which is a significant handicap for me. I discovered ...
tripleee's user avatar
  • 1,027
17 votes

Can home and end keys be mapped when using Terminal?

Mapping home and end keys with your desired functionality will easily solve the problem. Many answers have been posted, but in case you are using zsh, you can set home to: \001 and set end to: \...
Dean Seo's user avatar
  • 271
17 votes

How can I send the currently active window to the back?

Short answer: No, Apple does not provide an API that allows you to alter an application window index except by bringing a window to the front (index 1). There are no elegant solutions. But: Long ...
JeremyDouglass's user avatar
16 votes

How can I remap Caps lock to both Escape and Control?

Karabiner is currently incompatible with MacOS Sierra. Another, Sierra-friendly solution, is with Keyboard Maestro (it is not free). Change the behavior of the Caps-Lock key to Control through System ...
grokfully's user avatar
  • 161
16 votes

How can I remap keys on an external keyboard, but keep the default layout on the internal?

Now you do not need any additional software. In System -> Keyboard -> Modifier keys you can remap separately each keyboard.
Marcin Trofimiuk's user avatar
16 votes

Is it possible to swap option and command keys for a specific keyboard?

Note that some Logitech keyboards, like the K850 or Craft, allow swapping mode via pressing and holding for 2-3 seconds. fn+o for mac layout fn+p for pc layout Source: https://images-eu.ssl-images-...
yairchu's user avatar
  • 272
16 votes

How do I remap a key in macOS Sierra, e.g., Right Alt to Right Control?

If all you want to do is remap a single key Example: How to Remap Escape Key on Mac Go to the  Apple menu and choose “System Preferences” and then go to the “Keyboard” preference panel and choose ...
jasonleonhard's user avatar
16 votes
Accepted

What is this fancy L with a curl on top, and how could I type it?

That character is SCRIPT CAPITAL L (Unicode U+2112), usually seen in by documents typeset with LaTeX for Laplace transforms or Lagrangian mechanics. \mathcal{L} results in: . In macOS, the closest ...
Jason Weinzierl's user avatar
15 votes

How to restore the default values on a keyboard in terminal?

Passing empty string didn't work for me, i.e. it didn't deactivate existing remappings. However, passing an empty array did the trick. hidutil property --set '{"UserKeyMapping":[]}'
gordey4doronin's user avatar
15 votes

Disable Terminal man page shortcut on Catalina

If you open Terminal -> Services -> Services Preferences there are some options there for enabling/disabling global keyboard shortcuts. Then you can disable this at Keyboard -> Shortcuts -&...
GreenGiant's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible