All Questions
Tagged with keybindings terminal
33 questions
0
votes
2
answers
499
views
Make backslash \ in terminal (Danish keyboard)
I am using a Danish keyboard language and Danish keyboard layout. When typing in my browser or other applications on my computer, I can make a backslash. In my case I use the combination shift + ...
1
vote
2
answers
153
views
How can I add a keyboard shortcut for a nested menu item?
It used to be possible (on macOS 10.14 below at least), to set up a keyboard shortcut to open up a specific terminal profile:
Unfortunately, on macOS 12 and later (at least, I never ran 10.15 or 11), ...
0
votes
0
answers
16
views
Terminal Profiles Keyboard Action
Where can I find detailed technical documentation describing what the elements of the GUI found in Terminal.app -> Settings -> Profiles -> keyboard?
The documentation that pops up when the ? ...
3
votes
1
answer
465
views
How can I use readline instead of editline in the Python REPL and other programs?
I prefer to use readline instead of editline in the Python REPL and MySQL for example. These programs are compiled with editline support as provided by Apple or Homebrew. How can I make them work with ...
0
votes
0
answers
101
views
Show key bindings in editline
In the man page for .editrc a command is shown for listing key bindings for editline. Editline is a library that is used in Python and MySQL, etc., in MacOS for command line editing.
bind
or
bind -l
...
0
votes
1
answer
146
views
Map Spotlight key to repeat last command in Terminal
Logically this is possible, but I'm not sure it is technically possible on a Mac. And I have no idea where to start, but here it is: I have a workflow right now where I (1) close the only tab in VS ...
0
votes
0
answers
423
views
How can I rebind command and control in the context of terminal applications?
I'm on macOS Ventura 13.1. I have the command and control modifier keys swapped in the macOS keyboard settings, and it works in most places, but terminal programs still expect command+X to close nano, ...
0
votes
1
answer
71
views
Why are the Emacs bindings to move around words (such as M-f (option-f) and M-b (option-b)) not working on bash terminal?
I am using macOS Monterey 12.5 on M1 hardware. In case this can be relevant, I am using an American keyboard with Brazilian Portuguese (ABNT2) as input.
Also, I am using a cool software Karabiner ...
1
vote
1
answer
560
views
How to pass `option-c` to Hyper terminal rather than `ç`?
I'm trying to get the fzf directory switcher to work in my terminal (Hyper).
It is supposed to work using option-c but in my case that just enters a cedille (ç).
One workaround I found is to use Esc-c ...
4
votes
2
answers
733
views
option+left and option+right skip special characters
So I have a new Mac M1
I'm trying to set up the terminal as it was in my previous system.
The problem now is that when using option+arrow (left or right) it jumps to the next space character instead ...
3
votes
1
answer
839
views
Why is Terminal.app weird about stealing keyboard focus on Monterey?
I use Due for reminders, and have it set up to use the keyboard shortcut Cmd+Opt+D to activate the Due window (which lives only in the Menu Bar, not the Dock). This works fine in most applications and ...
1
vote
2
answers
2k
views
How to change binding in zsh? command key vs control key
I moved to Mac OS and I'm facing the control vs command key problem.
I already changed the settings for my external keyboard, so that my control key is mapped to command key and viceversa. This fixes ...
1
vote
1
answer
714
views
Karabiner-Elements cannot open new Terminal window unless Terminal already in focus
I am on Catalina 10.15.7 and use Karabiner-Elements 13.3.
When I use the rule shown below for opening Terminal nothing happens unless Terminal is in focus (you can see Terminal on the menu bar).
Seems ...
1
vote
1
answer
262
views
terminal.app eats SHIFT key when used with UP and DOWN arrows (but not left or right)
Using cat in Terminal.app in order to view the raw codes, I get the following:
$ cat
^[[D # LEFT
^[[1;2D # S-LEFT
^[[C # RIGHT
^[[1;2C # S-RIGHT
^[[A # UP
^[[A # S-UP
^[[B # DOWN
^[[B ...
13
votes
1
answer
3k
views
Disable Terminal man page shortcut on Catalina
I recently upgraded to MacOS Catalina and when I am in IDEA IntelliJ, if I press Command + Shift + M the OS opens the Terminal program and attempts to load the man page for whatever I had highlighted ...
7
votes
2
answers
6k
views
In iTerm2 map the left Command key to the left Control key & map Command+Tab
In iTerm2, can I map the left ⌘ Command key to the left ^ Control
key and still map the system ⌘ Command ⇨Tab to still switch to all other windows?
I've use three different OS's (Ubuntu, macOS and ...
1
vote
0
answers
44
views
new keystrokes in Terminal defined, but do nothing
To move the insertion point backwards and forwards a word at a time, Terminal by default uses Option + left or right arrow.
Because my 101-key USB keyboard lacks an Option key, I'd like to use Control ...
0
votes
1
answer
90
views
Unicode escape is ctrl+[ , why does this work in terminal or vim, but not safari or other parts of OS?
When i'm working in VIM i'll often times use ctrl+[ to exit insert mode. But if i need to press escape in other parts of the OS ctrl+[ does not act the same way as escape.
For example if search a ...
2
votes
1
answer
1k
views
Re-mapping tilde ~ to escape with hidutil, hex code is wrong on technical note?
I want to map my esc key to ~ tilde.
Using this reference: How do I remap a key in macOS Sierra, e.g., Right Alt to Right Control?
I found this technical note
Using this code:
hidutil property --...
0
votes
1
answer
234
views
Use [command]-[return] for shortcut
My Problem
On my Mac I would love to emulate my Linux development workflow using key-binds. A core part of this workflow is that when I press [super]-[enter] a new terminal window opens.
My Attempts
...
9
votes
3
answers
5k
views
How to restore the default values on a keyboard in terminal?
I used the hidutil function to remap several keys on my keyboard:
hidutil property --set '{"UserKeyMapping":
[{"HIDKeyboardModifierMappingSrc":0x70000003e,
"HIDKeyboardModifierMappingDst":...
2
votes
1
answer
3k
views
Key binding in iTerm2
I am trying to bind a shortcut to perform cut command in iTerm2. Obviously, cut is bound to Cmd + x, but I would also like it to be bound to Ctrl + w.
I did this easily for paste by going to iTerm2 → ...
1
vote
2
answers
853
views
How to disable middle click? [duplicate]
Middle click to paste is making scrolling impossible in Terminal on my thinkpad keyboard because of middle click pasting.
I'd prefer to just disable it on that app, but globally would be fine.
I ...
4
votes
2
answers
3k
views
How do I make `Cmd` as `Meta` instead of `Option/Alt` key on `emacs` runs on terminal(with `-nw` option)
A lot of questions and articles about this but I can't find a one that works on my system.
Modifying emacs configuration looks working on other people's but it doesn't work for me.
like this
(...
2
votes
0
answers
231
views
bindkey not working from inside .cshrc file
Here is my .cshrc:
echo Enter
bindkey ^Z run-fg-editor
bindkey ^[OA history-search-backward
bindkey ^[OB history-search-forward
bindkey ^[[A history-search-backward
bindkey ^[[B history-search-...
3
votes
1
answer
503
views
How do you bind a key sequence to shell command?
Using stock Terminal.app on El Capitan, the effort is to set up a shortcut in a sense, that upon press it would execute a specific command.
Consulting man pages for bind command following steps have ...
2
votes
1
answer
582
views
Specifying Terminal-only mapping in Karabiner
I am trying to remap specific Ctrl+<Key> combinations to Command+<Key> in Terminal.app using Karabiner. The following private.xml is used:
<?xml version="1.0"?>
<root>
<...
1
vote
0
answers
23
views
How to allow OPT and # simultaneously in terminal [duplicate]
My (UK) MacBook Air keyboard doesn't have # marked. It has ± and §, which I have never used, but it doesn't have #, which is an extremely common character in computer code. Instead, I have to use the ...
14
votes
2
answers
7k
views
Apple terminal no home and end key - Use cmd left or cmd right
How do I make
⌘+← and ⌘+→ move the text cursor very left and right of the terminal entry line. This keyboard shortcut works on most things on my mac book but not the Terminal.
Usually I use the home ...
0
votes
0
answers
287
views
Binding Escape Sequences to Terminal Keys Produces Characters, Not Actions
I was using an iMac from 2009. I had upgraded it regularly, going up to (and including) Mavericks. When I first got that iMac, I fixed the keys in Terminal so Home and End would move the cursor to ...
1
vote
0
answers
239
views
Adjusting Brightness, or executing any keypress, on remote computer via ssh
What are the options to target specific keys on a remote computer and execute the equivalent of virtually pressing them from the terminal via ssh (what would normally be a user pressing them)?
...
64
votes
4
answers
60k
views
iterm - what's the key-combo to switch panes?
I've learned how to split my terminal windows with apple-d and apple-shift-d. Its very useful.
How do I then switch between the two panes (see below) using the keyboard?
I know I can use the mouse ...
152
votes
11
answers
89k
views
Can home and end keys be mapped when using Terminal?
The Home and End keys on a MacBook Pro can be emulated with Fn + ← or fFn + →. Or when certain settings are changed, with the ⌘ Command key instead of Fn.
None of these works in Terminal.
As I ...