Skip to content

Commit

Permalink
Merge pull request #279 from gui-cs/delete-fix
Browse files Browse the repository at this point in the history
Delete keybinding fix
  • Loading branch information
tznind authored Jan 1, 2024
2 parents d187bdc + 4f182c7 commit 71c25d5
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Keys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Open: Ctrl+O
Save: Ctrl+S
Redo: Ctrl+Y
Undo: Ctrl+Z
Delete: Delete
Delete: DeleteChar
ToggleDragging: F3
AddView: F2
ToggleShowFocused: Ctrl+L
Expand Down
2 changes: 1 addition & 1 deletion src/UI/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void Run(Options options)
}
}

Application.KeyUp += (_, k) =>
Application.KeyDown += (_, k) =>
{
if (this.editing)
{
Expand Down
2 changes: 1 addition & 1 deletion src/UI/KeyMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public KeyMap( )
Key.S.WithCtrl.ToString( ),
Key.Y.WithCtrl.ToString( ),
Key.Z.WithCtrl.ToString( ),
Key.Delete.ToString( ),
Key.DeleteChar.ToString( ),
Key.F3.ToString( ),
Key.F2.ToString( ),
Key.L.WithCtrl.ToString( ),
Expand Down
4 changes: 2 additions & 2 deletions tests/KeyMapTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal class KeyMapTests
Save: Ctrl+S
Redo: Ctrl+Y
Undo: Ctrl+Z
Delete: Delete
Delete: DeleteChar
ToggleDragging: F3
AddView: F2
ToggleShowFocused: Ctrl+L
Expand Down Expand Up @@ -119,7 +119,7 @@ public void EmptyConstructor_HasExpectedDefaults( )
Key.S.WithCtrl.ToString( ),
Key.Y.WithCtrl.ToString( ),
Key.Z.WithCtrl.ToString( ),
Key.Delete.ToString( ),
Key.DeleteChar.ToString( ),
Key.F3.ToString( ),
Key.F2.ToString( ),
Key.L.WithCtrl.ToString( ),
Expand Down
2 changes: 1 addition & 1 deletion tests/Keys.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AddView": "F2",
"Copy": "Ctrl+C",
"Delete": "Delete",
"Delete": "DeleteChar",
"EditProperties": "F4",
"EditRootProperties": "F5",
"MoveDown": "Shift+CursorDown",
Expand Down
2 changes: 1 addition & 1 deletion tests/Keys_Alternate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Open: Ctrl+O
Save: Ctrl+S
Redo: Ctrl+Y
Undo: Ctrl+Z
Delete: Delete
Delete: DeleteChar
ToggleDragging: F5
AddView: F6
ToggleShowFocused: Ctrl+L
Expand Down

0 comments on commit 71c25d5

Please sign in to comment.