1 local termkey
= require('termkey')
2 local inspect
= require('inspect')
4 local tk
= termkey
.new({ spacesymbol
= true, ctrlc
= true })
7 print('Cannot allocate termkey instance')
11 if tk
:get_flags()["utf8"] then
12 print('Termkey in UTF-8 mode')
13 elseif tk
:getflags()["raw"] then
14 print('Termkey in RAW mode')
19 local k
= tk
:waitkey()
20 while k
~= "eof" and k
~= "error" do
23 if k
.ctrl
and (k
.utf8
== "c" or k
.utf8
== "C") then
25 elseif not (k
.ctrl
or k
.shift
or k
.alt
) and k
.utf8
== "?" then