mirror of
https://github.com/koreader/koreader
synced 2024-11-10 01:10:34 +00:00
Terminal: Ignore ctrl on chars less than '@'
Previous behaviour was to crash.
This commit is contained in:
parent
cf83dc8bd3
commit
1ae38ea8bd
@ -466,7 +466,10 @@ function Terminal:generateInputDialog()
|
||||
end,
|
||||
strike_callback = function(chars)
|
||||
if self.ctrl and #chars == 1 then
|
||||
chars = string.char(chars:upper():byte() - ("A"):byte()+1)
|
||||
local n = chars:upper():byte() - ("A"):byte()+1
|
||||
if n >= 0 then
|
||||
chars = string.char(n)
|
||||
end
|
||||
self.ctrl = false
|
||||
end
|
||||
if chars == "\n" then
|
||||
|
Loading…
Reference in New Issue
Block a user