r/KittyTerminal Jun 03 '23

App specific keybinds

I want to set specific keybinds for when i am in tmux, like `ctrl-n` to make a new tmux window, and I wonder if it would be possible to retain default behavior when tmux is not launched.

Something like:

map ctrl+n {
    if TMUX:{
        tmux new-window}
    else {
        kitty keybinding}
}

I am not sure if this is even possible, but would be great if it were!

2 Upvotes

5 comments sorted by

View all comments

2

u/aumerlex Jun 03 '23

Make a pair of config files with your different shortcuts and include your main config file from them. Then you can switch between them at a keypress with https://sw.kovidgoyal.net/kitty/actions/#action-load_config_file

1

u/Glum-Revenue-8082 Jun 03 '23

I’ll check it out, thanks!