Commit Graph

43 Commits

Author SHA1 Message Date
Rein Fernhout
6d20946dfe
Mark alacritty as supporting kitty protocol (#851) 2024-05-03 19:32:04 +02:00
Josh McKinney
39ef1e42ba
Implement Display for KeyCode and KeyModifiers (#862)
Partially addresses #792
* Implement Display for KeyCode and KeyModifiers
* Add demo for Display implementation
2024-05-03 19:23:07 +02:00
Robin Grönberg
55739aa786
Add support for scrolling left and right. (#788) 2023-08-05 15:35:43 +02:00
Timon
b2cbd94853
Upgrade to bitflags 2 (#777) 2023-04-08 15:30:43 +02:00
gibbz00
a2c9350ff2
Unwrap crossterm::Result<T, ErrorKind> to std::io::Result. (#765) 2023-04-07 18:17:10 +02:00
Timon
03c25178af
Make the events module an optional feature (#776) 2023-04-07 17:09:15 +02:00
Michael Davis
bca71adad7
Implement "report alternate keys" from the Kitty Keyboard Protocol (#754)
The "report alternate keys" part of the Kitty keyboard protocol will
send an additional codepoint containing the "shifted" version of a
key based on the keyboard layout. This is useful for downstream
applications which set up keybindings based on symbols instead of
exact keys being pressed.

For example, underscore (_) with the Alt modifier is sent as minus (-)
with Alt and Shift modifiers. A terminal will send the underscore
codepoint as an alternate though, and we can use that information and
the presence of the Shift modifier to resolve the symbol. Other
examples are 'A-(' (sent as 'A-S-9') and 'A-)' (sent as 'A-S-0').

This change allows pushing the "report alternate keys" flag and
overwrites the keycode and modifiers for any shifted keys sent by the
terminal.
2023-02-11 10:40:11 +01:00
Timon
318f810a39
Support key release events for windows. (#745) 2023-01-28 11:05:31 +01:00
Michael Davis
3fe13e18d8
Add a function for checking keyboard enhancement support (#732)
* Add a function for checking keyboard enhancement support

This follows the Kitty documentation's recommended way to check for
progressive keyboard enhancement: query the flags and then query the
primary device attributes (which is broadly supported). If we receive
only the device attributes, the protocol is not supported.

* Check keyboard enhancement in the event-read example
2023-01-10 19:23:34 +01:00
Basil Kohler
bb48b93b46
Improved doc for KeyEvent kind field (#739) 2023-01-10 19:16:52 +01:00
Baldo Alessandro
ce8dd0bd6d
Fixed typo in doc (#722) 2022-10-21 10:04:22 +02:00
Tim Oram
c8ab3152bb
Fix typo on KeyEventState::CAPS_LOCK docs (#707) 2022-08-21 11:12:09 +02:00
Charlie Groves
1fee5ff30c
Add bracketed paste parsing (#693) 2022-08-10 09:16:56 +02:00
Jesse Weaver
2a612e0f24
Add extra modifiers/state from kitty keyboard protocol (#696) 2022-08-10 09:09:14 +02:00
Jesse Weaver
551659dee3
Add support for functional key codes from kitty keyboard protocol (#691) 2022-07-30 10:33:59 +02:00
Charlie Groves
069497b43b
Emit focus events (#689) 2022-07-28 12:07:01 +02:00
Charlie Groves
c6a8952201
Add execute_winapi on SetStyle to fix Windows compilation (#690) 2022-07-26 16:01:16 +02:00
Jesse Weaver
60e51be726
Increase support for kitty enhanced keyboard protocol (#688) 2022-07-24 14:06:46 +02:00
Kian-Meng Ang
21155716e2
Fix typos (#675) 2022-06-06 18:10:06 +02:00
mgunyho
39e6f1c3a1
Fix some broken links in docs (#671) 2022-05-29 18:41:34 +02:00
yjhn
0cb34f1df2
Fix links in docs (#639) 2022-03-15 21:48:38 +01:00
zohnannor
9bc5cd3527
Fix typos (#630) 2022-02-17 13:49:41 +01:00
Canop
fe5c303fcf
Make KeyEvent::new a const fn (#606) 2021-10-11 21:04:59 +02:00
mgunyho
24d0f561e8
Docs: Add some links related to raw mode (#581) 2021-07-26 18:21:21 +02:00
Kestrer
e1260446e9
Remove writer parameter from execute_winapi (#570) 2021-06-10 15:20:00 +02:00
Necrosovereign
92f62ba86f
KeyEvent case normalizing equality (#541) 2021-04-13 08:49:04 +02:00
Spencer Gouw
a9d9aff3f0
Documentation Fix (#543) 2021-03-04 08:57:52 +01:00
Timon Post
5319f3c673 Fix compile error. 2021-01-03 21:42:52 +01:00
Koxiaet
1418580fed
Remove lazy_static dependency (#530) 2021-01-03 14:40:22 +01:00
Koxiaet
df0c2358fd
Inline ansi modules (#529) 2021-01-03 14:29:29 +01:00
Timon
e46decc2f3
Fix wrong resize size return (#526) 2020-12-28 10:15:50 +01:00
Koxiaet
0797441893
Make imports & docs more consistent (#524) 2020-12-28 09:47:20 +01:00
Koxiaet
5be7d18475
Replace AnsiType with write_ansi (#523) 2020-12-28 07:56:32 +01:00
Koxiaet
e5d3959119
Add support for any event tracking (#502) 2020-11-22 13:52:15 +01:00
hagsteel
53afe55612
Update event.rs (#479) 2020-09-08 08:40:56 +02:00
sigmaSd
32215ec7f5
Grand writer access for winapi commands. 2020-07-20 12:58:04 +02:00
Bill
128eddeafc
fix single typo (#417) 2020-04-11 07:43:00 +02:00
Nathan Wilson
3efa8b9477
Removed some unnecessary parentheses and braces. (#409) 2020-04-04 09:21:18 +02:00
Ron B
e620c6b8be
Add NONE flag to KeyModifiers (#392) 2020-03-10 13:37:02 +01:00
Jonathan Turner
007063896e
Automatically close raw fd (#383) 2020-02-22 07:59:40 +01:00
Nathan West
f2fca91b30 Added basic trait implementations to all Commands (#363)
- Added basic trait implementations to all Commands
- Added `Debug` to all public-facing types
- Added `Clone` to several public-facing types, where relevant
- Added `Eq` to all `PartialEq` types
- Added `Debug` and `Clone` to a few internal types
- `ResetColor` uses `&'static str` instead of `String`
- Updated crossterm-winapi dependency
2020-01-28 20:20:26 +01:00
Timon
dec0d74b32
Refactored macro's, moved Output, rewrote documentation. (#326) 2019-12-04 17:26:57 +01:00
Timon
f597cfd232
Input module Rewrite (#284) 2019-11-18 21:50:57 +01:00