diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a933f5b..63057aa 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -31,6 +31,8 @@ - library - added "tob", a text output buffer + - added "c:get/ext", for reading keys and returning unique + codes for arrows - retro-compiler diff --git a/library/c-get-ext.retro b/library/c-get-ext.retro new file mode 100644 index 0000000..bb7e90c --- /dev/null +++ b/library/c-get-ext.retro @@ -0,0 +1,10 @@ +~~~ +:keys:UP #-300 ; +:keys:DOWN #-301 ; +:keys:RIGHT #-302 ; +:keys:LEFT #-303 ; + +:c:get/ext (-c) + c:get dup #27 eq? + [ drop c:get drop c:get #235 + n:negate ] if ; +~~~