If you live in the terminal, kitty is made for you! Cross-platform, fast, feature-rich, GPU based. https://sw.kovidgoyal.net/kitty/
Find a file
bjohas 9d678fa9f2 Add remap_modifier to present one modifier key to kitty as another
remap_modifier <from> <to>

Repeatable and off by default. The declarations compose as a single
simultaneous permutation applied once per event, so

    remap_modifier ctrl super
    remap_modifier super ctrl

exchanges the two rather than collapsing to the identity. Only shift, alt,
ctrl, super, hyper and meta may be named; anything else is rejected with an
error. The last declaration for a given source wins.

The remap is applied to the modifier mask BEFORE the platform produces the
keysym and text - in glfw_xkb_update_modifiers() before xkb_state_update_mask()
on Linux, and in remap_cocoa_flags() before UCKeyTranslate() and
interpretKeyEvents: on macOS. Applying it to the finished event instead
desynchronises the modifiers from the text for any modifier that participates
in text production: shift on Linux, and Option on macOS, which produces text
natively unless macos_option_as_alt is set.

Because the GLFW modifiers are themselves derived from that state, this is
application wide: kitty's own shortcuts, kitty_mod and the bytes sent to the
child all see the remapped modifier, and every mapping in kitty.conf is written
in terms of the modifier a key becomes. X11 pointer events do not go through
xkb, so translateState() - which only ever sees button and DND events - gets
the same treatment; Wayland pointer events already carry xkb-derived modifiers.

A modifier key's own event has its identity remapped too, so a program using
the full keyboard protocol does not see ctrl reported together with LEFT_HYPER.
The press/release state fixup on Linux is given the remapped modifier rather
than the physical one, so press and release agree.

--debug-input reports each remapped event.

Notes: on Wayland kitty only detects hyper and meta when
KITTY_WAYLAND_DETECT_MODIFIERS is set, so remapping to or from them has nothing
to act on there. On macOS hyper and meta have no Cocoa modifier flag, so a
remap onto them is left unapplied rather than silently dropping the modifier,
and interpretKeyEvents: is only approximately corrected because the event's
characters strings were computed by the OS from the physical flags; the
UCKeyTranslate() path, normally the one taken, is exact.

Generated option files and the glfw wrapper come from their generators.
2026-08-06 16:22:37 +01:00
.github Bump github/codeql-action from 4.37.1 to 4.37.3 in the actions group 2026-08-03 03:45:03 +00:00
3rdparty
bypy
docs Cleanup previous PR 2026-08-03 08:55:12 +05:30
gen
glad
glfw Add remap_modifier to present one modifier key to kitty as another 2026-08-06 16:22:37 +01:00
kittens Desktop file chooser integration: when the specified directory does not exist, open file chooser at home directory 2026-07-28 09:04:57 +05:30
kitty Add remap_modifier to present one modifier key to kitty as another 2026-08-06 16:22:37 +01:00
kitty_tests Wayland: do not ignore the scroll wheel after reversing direction 2026-08-02 15:47:31 -04:00
logo
shell-integration
terminfo
tools fix locking in LRUCache 2026-07-27 09:34:01 +05:30
.editorconfig
.gitattributes
.gitignore
__main__.py
benchmark.py
Brewfile
build-terminfo
CHANGELOG.rst
CONTRIBUTING.md
count-lines-of-code
dev.sh
embeds.go
go.mod Bump the all-go-deps group with 3 updates 2026-08-03 03:43:01 +00:00
go.sum Bump the all-go-deps group with 3 updates 2026-08-03 03:43:01 +00:00
INSTALL.md
key_encoding.json
LICENSE
local-agent.md
Makefile
publish.py
pyproject.toml
README.asciidoc
rsync-and-build.sh
SECURITY.md
session.vim
setup.py macOS: Disable macOS one time code autofill popups 2026-07-13 09:06:24 +05:30
shell.nix
staticcheck.conf
test.py
update-on-ox

= kitty - the fast, feature-rich, cross-platform, GPU based terminal

If you live in the terminal, *kitty* is made for **you**!

See https://sw.kovidgoyal.net/kitty/[the kitty website].

image:https://github.com/kovidgoyal/kitty/workflows/CI/badge.svg["Build status", link="https://github.com/kovidgoyal/kitty/actions?query=workflow%3ACI"]

https://sw.kovidgoyal.net/kitty/faq/[Frequently Asked Questions]

To ask other questions about kitty usage, use either the https://github.com/kovidgoyal/kitty/discussions/[discussions on GitHub] or the
https://www.reddit.com/r/KittyTerminal[Reddit community]

Packaging status in various repositories:

image:https://repology.org/badge/vertical-allrepos/kitty-terminal.svg?columns=3&header=kitty["Packaging status", link="https://repology.org/project/kitty-terminal/versions"]