Hacker News new | ask | show | jobs
by dahart 751 days ago
Yes you can define your own key bindings. The default is the same “prefix key” that ‘screen’ uses - Ctrl-b. Personally I like to use Ctrl-j because it’s easier to type and has fewer conflicts with shells and other things. Most of the key bindings that follow the prefix key seem natural to me, stuff like ‘c’ to create a new tab, ‘d’ to detach from tmux, ‘n’ to go to the next tab, etc., but all of that can be customized.
2 comments

> The default is the same “prefix key” that ‘screen’ uses - Ctrl-b.

Isn't the default command key ctrl-A for screen? Which is why I've always had to change it (to ctrl-O which is much more sensible) because I can't live without ctrl-A in the terminal etc.

Yep. You can run tmux inside screen. Ctrl-A for screen, Ctrl-B for tmux. (Of course, you can redefine the command key in both screen and tmux.)
Yeah. Also happens to clash with my preferred window manager's prefix key (ratpoison).
You’re right! Thanks, yeah I can’t live without ctrl-a either, I use that all the time.
You can even use a sequence to activate it -- my prefix is "typing ` twice within x ms" and it avoids conflict.
In screen, I just use a single backtick, as I very rarely use it for any other application in a terminal session (I prefer "$()" in shell, invariably edit TeX and Lisp in GUI Emacs, and the only only other thing that comes immediately to mind is opening the developer console in mpv and various video games).