Commit 24cf2714 authored by Bernd Paysan's avatar Bernd Paysan

Fix ekey problem with shift-tab

parent 195f0109
......@@ -70,6 +70,8 @@ keycode k-f9 ( -- u ) \ X:ekeys
keycode k-f10 ( -- u ) \ X:ekeys
keycode k-f11 ( -- u ) \ X:ekeys
keycode k-f12 ( -- u ) \ X:ekeys
keycode k-tab
drop
' k-f1 alias k1 ( -- u ) \ gforth-obsolete
......@@ -201,6 +203,8 @@ k-next s" [6~" esc-sequence
k-insert s" [2~" esc-sequence
k-delete s" [3~" esc-sequence
k-tab k-shift-mask or s" [Z" esc-sequence
k-left k-shift-mask or s" [1;2D" esc-sequence
k-right k-shift-mask or s" [1;2C" esc-sequence
k-up k-shift-mask or s" [1;2A" esc-sequence
......@@ -375,4 +379,4 @@ set-current
.s ekey .s drop
again ;
\ test-ekey?
[then]
\ No newline at end of file
[then]
......@@ -73,12 +73,12 @@ $80 Value max-single-byte
Defer check-xy ' noop IS check-xy
: u8key ( -- u )
defers key dup max-single-byte u< ?EXIT \ special case ASCII
key dup max-single-byte u< ?EXIT \ special case ASCII
dup $FF = ?EXIT \ special resize character
dup $C2 u< IF UTF-8-err throw THEN \ malformed character
$7F and $40 >r
BEGIN dup r@ and WHILE r@ xor
6 lshift r> 5 lshift >r >r defers key
6 lshift r> 5 lshift >r >r key
dup $C0 and $80 <> IF UTF-8-err throw THEN
$3F and r> or
REPEAT rdrop ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment