diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-06-24 23:39:16 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-06-24 23:39:16 -0700 |
commit | 5020ff316310b4ea67a5ee8901cb0ca60ddd5f81 (patch) | |
tree | bea695a78587a2bf9670bd8115d30603145234ed | |
parent | ccd84d949db6aba59dde4e7721f8f3f345b02de2 (diff) | |
download | mu-5020ff316310b4ea67a5ee8901cb0ca60ddd5f81.tar.gz |
1645
-rw-r--r-- | edit.mu | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/edit.mu b/edit.mu index 94a14537..4c63f1aa 100644 --- a/edit.mu +++ b/edit.mu @@ -295,19 +295,23 @@ recipe event-loop [ loop-unless found?:boolean break-if quit?:boolean # only in tests trace [app], [next-event] + # mouse clicks { t:address:touch-event <- maybe-convert e:event, touch:variant break-unless t:address:touch-event editor:address:editor-data <- move-cursor-in-editor editor:address:editor-data, t:address:touch-event/deref loop +next-event:label } + # typing regular characters { c:address:character <- maybe-convert e:event, text:variant break-unless c:address:character editor:address:editor-data <- insert-at-cursor editor:address:editor-data, c:address:character/deref loop +next-event:label } - assert c:address:character, [event was of unknown type; neither keyboard nor mouse] + # otherwise it's a special key to control the editor + k:address:number <- maybe-convert e:event, keycode:variant + assert k:address:number, [event was of unknown type; neither keyboard nor mouse] loop } ] |