Skip to content

Commit b267d40

Browse files
committed
Add a bunch of new named keys to the Key module
1 parent 245c691 commit b267d40

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

src/UI/KeyboardShortcut/Key.elm

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,15 @@ type Key
111111
| Multiply
112112
| Plus
113113
| Minus
114+
| Underscore
114115
| ForwardSlash
116+
| BackSlash
117+
| Pipe
115118
| QuestionMark
119+
| LeftSquareBracket
120+
| RightSquareBracket
121+
| LeftCurlyBracket
122+
| RightCurlyBracket
116123
| Raw String
117124

118125

@@ -506,9 +513,30 @@ fromString str =
506513
"-" ->
507514
Minus
508515

516+
"_" ->
517+
Underscore
518+
509519
"/" ->
510520
ForwardSlash
511521

522+
"\\" ->
523+
BackSlash
524+
525+
"|" ->
526+
Pipe
527+
528+
"[" ->
529+
LeftSquareBracket
530+
531+
"]" ->
532+
RightSquareBracket
533+
534+
"{" ->
535+
LeftCurlyBracket
536+
537+
"}" ->
538+
RightCurlyBracket
539+
512540
"?" ->
513541
QuestionMark
514542

@@ -756,9 +784,30 @@ view os key =
756784
Minus ->
757785
"-"
758786

787+
Underscore ->
788+
"_"
789+
759790
ForwardSlash ->
760791
"/"
761792

793+
BackSlash ->
794+
"\\"
795+
796+
Pipe ->
797+
"|"
798+
799+
LeftSquareBracket ->
800+
"["
801+
802+
RightSquareBracket ->
803+
"]"
804+
805+
LeftCurlyBracket ->
806+
"{"
807+
808+
RightCurlyBracket ->
809+
"}"
810+
762811
QuestionMark ->
763812
"?"
764813

0 commit comments

Comments
 (0)