1
0
Fork 0

Actually subscribe to key events.

This commit is contained in:
Nicolas Perriault 2017-07-17 16:14:35 +02:00
parent 575f6086cf
commit 8fca68438f
No known key found for this signature in database
GPG Key ID: DA5E4C83904F7A2A
2 changed files with 2 additions and 1 deletions

View File

@ -60,4 +60,5 @@ subscriptions { clients, currentView } =
, uploadSuccessSub , uploadSuccessSub
, uploadErrorSub , uploadErrorSub
, keyDownsSub , keyDownsSub
, keyUpsSub
] ]

View File

@ -197,7 +197,7 @@ draftView ({ draft, currentUser, ctrlPressed } as model) =
Ok NoOp Ok NoOp
else if code == 27 then else if code == 27 then
Ok <| DraftEvent CloseAutocomplete Ok <| DraftEvent CloseAutocomplete
else if code == 13 && ctrlPressed then else if ctrlPressed && code == 13 then
Ok SubmitDraft Ok SubmitDraft
else else
Err "not handling that key" Err "not handling that key"