Commit Graph

62 Commits

Author SHA1 Message Date
Kovid Goyal
774a6c8c8b Remove glfw key constants 2021-01-16 20:52:12 +05:30
Kovid Goyal
a30ea2b7f8 Implement progressive enhancement of key event reporting 2021-01-16 20:52:12 +05:30
Kovid Goyal
c8a9336160 Code to encode key events 2021-01-16 20:52:12 +05:30
Kovid Goyal
a3fc3233cd Fix pre-edit text not always being cleared with iBus input
Fixes #2862
2020-07-18 19:31:38 +05:30
Luflosi
85fe783652 Fix fake scroll when scrolling in unfocused kitty window
Scrolling should happen in the kitty window under the mouse cursor, not in the currently active kitty window.
2020-06-05 16:44:11 +02:00
Luflosi
b796ceecdd Add Caps Lock to the list of modifier keys
When a key is pressed and `mouse_hide_wait` is less than zero, kitty will hide the mouse cursor. When a key is pressed, kitty will also scroll the history to the bottom. Both of these things don't happen if the key being pressed was a modifier key. Both of these things should not happen when Caps Lock is pressed, so this key should be added to the list of modifier keys.
`is_modifier_key()` is not used for anything else.
2019-11-09 00:41:12 +01:00
Benoit de Chezelles
28525766a5 Final changes before 'ready for review' 2019-10-16 02:47:14 +02:00
Benoit de Chezelles
7f2b98fad7 Rename all uses of 'scancode' to 'native_key' where relevant 2019-10-16 02:25:20 +02:00
Kovid Goyal
4ec1a8d9c3 Merge branch 'extract-glfw-key-event-data' of https://github.com/bew/kitty 2019-09-25 15:44:56 +05:30
Benoit de Chezelles
53275c9137 Extract key event data to struct 2019-09-24 19:15:35 +02:00
Kovid Goyal
6a31909557 Make the MIN and MAX macros typesafe 2019-07-01 17:03:47 +05:30
Kovid Goyal
6b9c71ec62 ... 2019-06-04 17:24:42 +05:30
Kovid Goyal
4fff84b4b9 Add void to all function declarations for functions that take no arguments
Micro-optimization for some architectures. Enforced via
-Wstrict-prototypes
2019-05-13 11:04:21 +05:30
BlahGeek
e36e44ab3a macOS: do not pass input events while having marked text
fix chinese input method backspacing issue

macOS: Set pre-edit text for IME

macOS: implement glfwPlatformUpdateIMEState

set firstRectForCharacterRange correctly

macOS: update IME position on each input

macOS: use float instead of int for updateIMEState

minor fix

macOS: ignore marked text on deadkey

fixes german keyboard input

macOS: convert markedRect to screen coord
2019-05-03 13:27:06 +05:30
Kovid Goyal
25cfcdba76 Dont hide mouse on modifier key presses 2019-04-16 15:16:14 +05:30
Kovid Goyal
6f5004fc13 Merge branch 'hide_mouse_on_key' of https://github.com/Luflosi/kitty 2019-04-15 19:55:00 +05:30
Luflosi
beb90f2c55 Implement feedback 2019-04-15 09:17:31 +02:00
Luflosi
0e0aba7a5e Option for hide mouse on keypress event 2019-04-14 18:07:26 +02:00
Kovid Goyal
6ec58f58ce Allow mapping shortcuts using the raw key code from the OS
Fixes #848
2018-09-02 18:46:10 +05:30
Kovid Goyal
0e248b3faa Write escape codes to children atomically
Ensure a partial escape code is never written
2018-08-29 09:01:52 +05:30
Kovid Goyal
acdb56ad5d ... 2018-08-11 06:52:05 +05:30
Kovid Goyal
1bb6540b64 Better debug output for pre-edit text 2018-08-06 11:08:12 +05:30
Kovid Goyal
1486af8770 More debug output when using --debug-keyboard 2018-07-26 08:41:16 +05:30
Kovid Goyal
5b1eaa741c IME input: Show the pre-edit text while the IME is in progress
Text is show in reverse video
2018-07-12 18:18:21 +05:30
Kovid Goyal
21f1fd55f8 Have the IBUS popup display at the cursor position 2018-07-12 18:18:19 +05:30
Kovid Goyal
56063b283e Implement text commit from the IME system 2018-07-12 18:18:19 +05:30
Kovid Goyal
c8fc21d336 Linux: Allow using XKB key names to bind shortcuts to keys not supported by GLFW
Useful to bind keys such as the play/pause or volume buttons. Also can
be used to bind non-ascii keys on international keyboards. Fixes #665
2018-06-22 12:41:50 +05:30
Robert Ricci
8e84b21452 Re-order includes for "_POSIX_C_SOURCE"
One FreeBSD, the build was getting errors about _POSIX_C_SOURCE
being redefined. The fix for this is to make sure that Python.h
gets included before any system libraries.
2018-06-02 11:26:02 -06:00
Kovid Goyal
8ea84c97d5 Use an overlay window for window resizing
Also implement a remote command to resize windows
2018-05-17 23:26:41 +05:30
Kovid Goyal
190612d507 Make the resize step size configurable 2018-05-17 16:48:35 +05:30
Kovid Goyal
e053d1f566 Implement resizing of individual windows in a layout
See the Layouts section in the README for details. Fixes #362

Note that it is only implemented for the Tall layout currently. Other
layouts to follow. The implementation might also be refined in the
future.
2018-05-17 15:09:41 +05:30
Kovid Goyal
fe5b8f3aec Fix using modifiers with subsequent keys in a muti-key shortcut not working 2018-04-24 09:42:37 +05:30
Kovid Goyal
dd18a1dfd8 Simplify is_ascii_control_char
No need to use macros for unsigned char
2018-04-20 14:30:07 +05:30
Kovid Goyal
a6d96c9a14 Fix #471 2018-04-20 09:32:01 +05:30
Kovid Goyal
2504266806 macOS: Fix option as alt not working for keys that act as dead keys in the current keyboard layout 2018-04-19 17:44:31 +05:30
Kovid Goyal
530fd61125 Add support for multi-key shortcuts
Fixes #338
2018-03-31 12:21:37 +05:30
Kovid Goyal
7a3534baf8 Make ascii control char test nicer 2018-03-31 12:21:37 +05:30
Kovid Goyal
da8e2d3d4a Adjust keys callback for new glfw keyboard API 2018-03-31 12:21:36 +05:30
Kovid Goyal
582500d3e9 Basic changes for new glfw keyboard API 2018-03-31 12:21:36 +05:30
Kovid Goyal
1fc605cbc0 Move needs_special_handling definition into keys.c 2018-02-22 14:37:51 +05:30
Kovid Goyal
f9141120aa A few fixes for the extended key protocol 2018-02-08 12:57:16 +05:30
Kovid Goyal
63317f9c78 macOS: Fix alt+arrow keys not working when disabling the macos_option_as_alt config option. 2018-01-21 15:41:56 +05:30
Kovid Goyal
cc145ec3dd DRYer 2018-01-04 12:38:35 +05:30
Kovid Goyal
847ce37160 Take the mouse wheel multiplier into account when generating keypresses for mouse wheel events. Fixes #262 2018-01-04 12:34:31 +05:30
Kovid Goyal
0fcce6ec58 Remove trailing whitespace from native code files 2017-12-20 08:44:47 +05:30
Kovid Goyal
138bfcf2a8 Fix key-presses mapped to CSI codes not respecting SC81t mode 2017-12-05 20:21:13 +05:30
Kovid Goyal
c17c6cae4c Support S8C1T mode
That is, eight bit control codes. When in S8C1T mode, kitty will send
only eight bit control codes to the client.
2017-12-05 20:21:12 +05:30
Kovid Goyal
dfd8a69cf2 Build kitty against bundled glfw 2017-12-01 12:15:36 +05:30
Kovid Goyal
f0003f223a Start work on multi-window support
Port the glfw.c module and various bits of code that depend on it.
2017-12-01 12:15:31 +05:30
Kovid Goyal
505ae90fd7 macOS: Add an setting to have the option key not behave as alt 2017-11-08 09:14:19 +05:30