Commit graph

130 commits

Author SHA1 Message Date
Kovid Goyal
da1626090a
Update codebase to Python 3.10 using pyupgrade 2025-02-03 10:56:50 +05:30
Kovid Goyal
0a28521677
... 2024-12-20 19:12:41 +05:30
Kovid Goyal
3b8c7f6dd9
macOS: Fix shortcuts that become entries in the global menubar being reported as removed shortcuts in the debug output 2024-09-08 09:48:14 +05:30
Kovid Goyal
f1d0d0949b
Run pyupgrade to update the codebase to python 3.9
Gets rid of a lot of typing ugliness by using type annotations on
builtin types
2024-07-31 07:55:27 +05:30
Kovid Goyal
95c44cac01
Better integration point for keyboard mode change notification 2024-05-21 14:51:46 +05:30
Kovid Goyal
66d9db6d0a
focus_visible_window: Fix selecting with mouse click leaving keyboard in unusable state
Fixes #7390
2024-04-26 07:30:38 +05:30
Kovid Goyal
23779da2dc
Provide access to the current keyboard mode in the tab_title_template 2024-04-01 22:12:49 +05:30
Kovid Goyal
5a2ee2f9a3
macOS: Fix kitten @ select-window leaving the keyboard in a partially functional state
Fixes #7074
2024-01-27 12:53:58 +05:30
Kovid Goyal
c95fc3689b
A single multi-key mapping should not prematurely complete as that confuses people trying out the feature
See #7073
2024-01-26 20:04:33 +05:30
Kovid Goyal
8c50632a10
Fix a single key mapping not overriding a previously defined multi-key mapping 2024-01-26 18:02:25 +05:30
Kovid Goyal
d6e55f72c0
Forgot to stub out one method for the test 2024-01-25 14:18:09 +05:30
Kovid Goyal
cd30de3727
Fix #7055 2024-01-25 14:06:52 +05:30
Kovid Goyal
cec427777c
Add some tests for mappings 2024-01-25 13:56:42 +05:30
Kovid Goyal
30e3ad83bc
Move mapping code into its own class
Better encapsulation. Makes boss.py smaller. Allows writing tests
for mapping logic
2024-01-25 11:51:43 +05:30
Kovid Goyal
9e815212dc
Implement modal keyboard handling 2023-11-30 19:44:41 +05:30
Kovid Goyal
716bf714db
Fix a couple of tests 2023-11-30 11:53:09 +05:30
Kovid Goyal
f11f770011
Allow creating key mappings that depend on the state of the focused window, such as what program is running inside it 2023-11-30 11:35:30 +05:30
Kovid Goyal
77292a16d6
Make shebangs consistent
Follow PEP 0394 and use /usr/bin/env python so that the python in the
users venv is respected. Not that the kitty python files are meant to be
executed standalone anyway, but, whatever.

Fixes #6810
2023-11-11 08:32:05 +05:30
Kovid Goyal
7fe5d7b58f
Replace isort with ruff 2023-01-09 16:47:42 +05:30
Kovid Goyal
ce91b6d9d9
Switch to using the new SingleKey implementation 2022-08-12 12:21:06 +05:30
Kovid Goyal
0c274a9a0b
Parse actions on demand
This removes the startup cost of parsing hundreds of default actions
when action_alias or kitten_alias are used. Although the cost is on the
order of 1ms, this design feels cleaner and gives nicer debug config
output.
2021-11-29 21:51:42 +05:30
Kovid Goyal
aa4fa4cc85
Allow defining aliases for more general actions, not just kittens
Fixes #4260
2021-11-22 19:52:43 +05:30
Kovid Goyal
6546c1da9b
run pyupgrade to upgrade the codebase to python3.6 2021-10-21 12:43:55 +05:30
Kovid Goyal
e7bfb04047
Fix mouse actions not working when caps lock or num lock are engaged
Fixes #3859
2021-07-24 07:06:46 +05:30
Kovid Goyal
6d7df1c5e8
Refactor configuration file parsing
Now the time for importing the kitty.config module has been halved, from
16ms from 32ms on my machine. Also, the new architecture will eventually
allow for auto generating a bunch of python-to-C boilerplate code.
2021-05-31 17:40:49 +05:30
Kovid Goyal
5470dd74bd
Move options code into its own directory 2021-05-31 17:40:48 +05:30
Kovid Goyal
6c344d4ae2
Move the action parsing code into options_types 2021-05-31 17:40:47 +05:30
Kovid Goyal
4c644b8556
Add NumLock and CapsLock reporting to the keyboard protocol 2021-04-13 07:10:00 +05:30
Kovid Goyal
5ffbee1e8c
Use shifted keys to match shortcuts as well 2021-01-16 20:52:15 +05:30
Kovid Goyal
027c5a57f1
Work on porting kittens to use new key infrastructure
Also move type definitions into their own module
2021-01-16 20:52:14 +05:30
Kovid Goyal
6b2ffc774f
Port shortcut and sequence matching code 2021-01-16 20:52:14 +05:30
Kovid Goyal
819bd5cd70
Tests for alternate key reporting 2021-01-16 20:52:13 +05:30
Kovid Goyal
1690718710
More removal of GLFW_KEY_ constants 2021-01-16 20:52:12 +05:30
Kovid Goyal
b94d2b27f4
Refactor single key config parsing to use a special type 2021-01-07 18:07:17 +05:30
Kovid Goyal
382c31ddf2
Use a stub rather than TYPE_CHECKING 2020-03-15 13:27:40 +05:30
Kovid Goyal
d3f37eeba4
more typing work 2020-03-14 11:42:05 +05:30
Kovid Goyal
ac2c21e046
more typing work 2020-03-09 16:13:00 +05:30
Kovid Goyal
cc1336a616
More typing work
Also use a mypy based linter when editing
2020-03-08 11:02:14 +05:30
Kovid Goyal
5035ed61ee
More typing work 2020-03-04 06:26:02 +05:30
Luflosi
476a8b1429
DRYer
Inspired by e0c66ea5ba.
2020-01-13 14:35:17 +01:00
Kovid Goyal
0e448347cd
Fix #2279 2020-01-13 06:50:14 +05:30
Kovid Goyal
e0c66ea5ba
DRYer 2020-01-12 21:42:12 +05:30
Luflosi
74eb523178
Add GLFW_KEY_CIRCUMFLEX to control_codes
See https://github.com/kovidgoyal/kitty/issues/1990.
2020-01-12 16:27:40 +01:00
Luflosi
2a5196873a
Update comment to remove legacy way of starting kitty
Since 9135387cfa kitty should not be started with `python3 .` anymore.
2019-12-24 14:22:37 +01:00
Kovid Goyal
b5229ec73c
oops 2019-12-23 10:19:02 +05:30
Kovid Goyal
3a2a16f54c
Merge branch 'add_circumflex_key' of https://github.com/Luflosi/kitty 2019-12-23 10:08:25 +05:30
Luflosi
b2d428618c
Add circumflex (^) key 2019-12-22 18:41:07 +01:00
Benoit de Chezelles
7f2b98fad7 Rename all uses of 'scancode' to 'native_key' where relevant 2019-10-16 02:25:20 +02:00
Luflosi
4037480d2b
Allow for up to 256 keys instead of 128 2019-09-08 12:32:19 +02:00
Luflosi
3f926dfd8b
Use keyboard key constants instead of hardcoded values 2019-09-08 12:32:18 +02:00