Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleans up key handling in drivers (was "fixes VkeyPacketSimulator is broken") #3078

Merged
merged 38 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
16ab9ea
Fixes #3054. VkeyPacketSimulator scenario is broken.
BDisp Dec 24, 2023
3f748be
Fix some key handle and unit tests.
BDisp Dec 24, 2023
6014ef4
Remove unnecessary conditional.
BDisp Dec 24, 2023
a938295
Improves key handling.
BDisp Dec 24, 2023
9349d54
Also allow map capslock to shift with accented characters.
BDisp Dec 25, 2023
f664a7b
Merge branch 'v2_develop' into v2_vkeypacketsimulator-fix_3054
BDisp Dec 26, 2023
bb00773
Change to MemberData.
BDisp Dec 27, 2023
723340a
Remove unnecessary using.
BDisp Dec 27, 2023
43afa07
Resolving merge conflicts.
BDisp Dec 28, 2023
1251370
Fix merge errors.
BDisp Dec 28, 2023
9216c9f
Fixes #3095. WindowsDriver should return the mask keys to IsShift, Is…
BDisp Dec 28, 2023
d256e25
Modifiers keys are valid to be handled on key down and key up.
BDisp Dec 28, 2023
c7bc119
Map KeyCode.Enter to ConsoleKey.Enter and vice versa.
BDisp Dec 28, 2023
afcdb7a
Merge branch 'v2_vkeypacketsimulator-fix_3054' of github.com:BDisp/Te…
tig Dec 31, 2023
cf684ed
Updated ScanCodeMapping table with readable constants
tig Dec 31, 2023
4db8ce3
Documented bugs
tig Dec 31, 2023
f5c92b9
Implemented mapping using MapVirtualKeyEx
tig Jan 1, 2024
5f0c035
Implemented mapping using MapVirtualKeyEx
tig Jan 1, 2024
9cd85fc
Changed KeyCode special keys to match ConsoleKey values + max unicode…
tig Jan 1, 2024
8893ffe
Fixed bogus CollectionNavigator impl and tests
tig Jan 1, 2024
466914a
Nuked DeleteChar. renamed InsertChar to Insert
tig Jan 1, 2024
1708762
KeyCode.Enter = ConsoleKey.Enter, not \n
tig Jan 2, 2024
da71023
Code cleanup
tig Jan 2, 2024
f817bc7
Added diag for keyboard layout name
tig Jan 2, 2024
5e94f72
Fixed AltGr support (hopefully)
tig Jan 2, 2024
64ec76d
Simplified code
tig Jan 3, 2024
9d3de85
Simplified KeyCode by removing ShiftKeys
tig Jan 3, 2024
a5424a5
Fixed TextView
tig Jan 3, 2024
ce8db7e
Code cleanup
tig Jan 3, 2024
85c8d3d
Fixes cursesdriver (somewhat)
tig Jan 3, 2024
198e261
Code cleanup
tig Jan 3, 2024
818e8fe
netdriver wip
tig Jan 4, 2024
b7fca27
Merge pull request #172 from tig/BDisp-v2_vkeypacketsimulator-fix_3054
BDisp Jan 4, 2024
8659916
Merged v2_develop
tig Jan 4, 2024
0d346ab
Fixed netdriver under WSL
tig Jan 4, 2024
31abd45
Turned off debug spew
tig Jan 4, 2024
d1f1ef4
Removed old code
tig Jan 4, 2024
223e8c6
Merge pull request #173 from tig/bDisp-v2_vkeypacketsimulator-fix_3054
BDisp Jan 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Terminal.Gui/Configuration/KeyJsonConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ namespace Terminal.Gui;
/// Support for <see cref="Key"/> in JSON in the form of "Ctrl-X" or "Alt-Shift-F1".
/// </summary>
public class KeyJsonConverter : JsonConverter<Key> {
/// <inheritdoc />
public override Key Read (ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => Key.TryParse (reader.GetString (), out var key) ? key : Key.Empty;

/// <inheritdoc />
public override void Write (Utf8JsonWriter writer, Key value, JsonSerializerOptions options) => writer.WriteStringValue (value.ToString ());
}
Loading
Loading