Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Add Meta to the list of modifier keys. Fixes #1050. [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-shatskyi committed May 26, 2017
1 parent 4df44f8 commit 851fbcd
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 1 deletion.
Binary file added .swo
Binary file not shown.
Binary file added .swp
Binary file not shown.
1 change: 1 addition & 0 deletions src/Enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export enum KeyCode {
X = 88,
Y = 89,
Z = 90,
Meta = 91,
Delete = 127,
Underscore = 189,
Period = 190,
Expand Down
2 changes: 1 addition & 1 deletion src/views/ViewUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function stopBubblingUp(event: Event): Event {
}

export function isModifierKey(event: KeyboardEvent) {
return [KeyCode.Shift, KeyCode.Ctrl, KeyCode.Alt].includes(event.keyCode);
return [KeyCode.Shift, KeyCode.Ctrl, KeyCode.Meta, KeyCode.Alt].includes(event.keyCode);
}

export function setCaretPosition(node: Node, position: number) {
Expand Down

0 comments on commit 851fbcd

Please sign in to comment.