Commit Graph

667 Commits

Author SHA1 Message Date
Remo Senekowitsch
1efdce7ef6
Link to latests docs in README (#785) 2023-06-12 19:06:45 +02:00
Kevin Vigor
2c534fc69e
Support NO_COLOR. (#782) 2023-06-12 19:06:11 +02:00
José Luis Cruz
dfc67e54c8
Fix interactive-demo (#783) 2023-04-23 12:41:00 +02:00
Timon
769b18151c Add comments to feature flags 2023-04-08 15:34:23 +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
41901c6382 Update lib.rs docs 2023-04-07 17:29:15 +02:00
lesleyrs
923aaf517b
Fix examples on windows (#775) 2023-04-07 17:10:56 +02:00
Timon
03c25178af
Make the events module an optional feature (#776) 2023-04-07 17:09:15 +02:00
Jimmy Hartzell
b354b4cc34
Make direct winapi deps optional (#767) 2023-04-01 13:07:46 +02:00
Timon
1af259f9ce Release 0.26.1 2023-02-26 16:52:54 +01:00
Jonathan Dickinson
e065a56536
Add synchronized output/update (#756) 2023-02-26 16:40:13 +01:00
Jonathan
e7fc698f24
Do not panic on poll() errors, and ignore EINTR (#762) 2023-02-26 16:39:19 +01:00
Orhun Parmaksız
4e880a5c90
Fix typos in CHANGELOG.md (#757) 2023-02-12 14:57:27 +01: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
Michael Davis
383d9a7827
Remove early return in keyboard enhancement check (#751) 2023-02-01 20:13:12 +01:00
Timon
338c122e99
0.26.0 (#750) 2023-01-28 11:12:26 +01:00
Timon
318f810a39
Support key release events for windows. (#745) 2023-01-28 11:05:31 +01:00
ahoyiski
a993a98291
Derived copy and clone for SetCursorStyle. (#748) 2023-01-21 22:18:41 +01:00
Cl00e9ment
fadec7a19c
SetCursorStyle documentation improvements (#744) 2023-01-12 21:08:39 +01:00
Jonathan
814df1c4a0
Fix CI failures (#746) 2023-01-12 21:04:29 +01:00
Timon
614e6a73b7
Add SetCursorStyle command (#742) 2023-01-11 21:04:02 +01:00
Jonathan
05229b71f9
Replace mio polling with filedescriptor's poll() (#735) 2023-01-11 20:15:32 +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
Arkid
81eb00fc32
Reword to De(serialize) (#729) 2023-01-08 14:17:56 +01:00
djarb
4383f8f010
Improved F1 through F4 handling (#736) 2022-12-28 13:11:04 +01:00
Leon
bf9f78994a
Fix minor warnings and typos (#726) 2022-12-04 12:41:24 +01:00
CenTdemeern1
b13e8ef64d
Fix typo in feature request issue template (#731) 2022-11-25 12:12:12 +01:00
CenTdemeern1
7e1279edc5
Add Chrome OS Crostini to tested terminals list (#721) 2022-10-23 15:26:44 +02:00
Baldo Alessandro
ce8dd0bd6d
Fixed typo in doc (#722) 2022-10-21 10:04:22 +02:00
Nathan
f845cea516
Make Windows resize event match terminal::size (#714) 2022-10-09 20:08:17 +02:00
Jesse Weaver
263a0fb5cf
Fix parsing of event types/modifiers with certain keys (#716) 2022-10-09 16:14:54 +02:00
DrowsyShroomy
10d1dc246d
Add commas after commands in doc 2022-08-21 11:13:09 +02:00
Tim Oram
c8ab3152bb
Fix typo on KeyEventState::CAPS_LOCK docs (#707) 2022-08-21 11:12:09 +02:00
Peter Hebden
69280152c9
More readable table in viewing source (#706) 2022-08-14 19:00:41 +02:00
Timon
5d02ed8c37
0.25 (#702) 2022-08-10 22:01:18 +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
Jeron Aldaron Lau
2362bc2cc6
Fix tty buffer size typo for unix (#701) 2022-08-10 09:07:08 +02:00
Lioness100
f59221e1a2
Fix typo in interactive demo (#699) 2022-08-03 14:09:06 +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
ahoyiski
4dcc6fc058
Create the SetStyle tuple struct (#687) 2022-07-21 21:05:02 +02:00
Timon
0c20590774
0.24 (#686) 2022-07-02 21:39:25 +02:00
Arkadiusz Wahlig
fe37c8947b
Add support for cursor keys events in application mode (^[Ox) (#681) 2022-07-02 19:38:04 +02:00
Timon
0a435e6cb9
Make clear which mouse commands are 0-based and which are 1-based. (#684) 2022-06-30 21:42:57 +02:00
Siphalor
f523c110a6
Fix zero terminal sizes being treated as ok in Unix (#680) 2022-06-30 21:34:10 +02:00