mirror of
https://github.com/koreader/koreader.git
synced 2026-10-09 18:49:54 +02:00
Fixes #13278. * Add correct external keyboard punctuation key names * Compose physical-keyboard text via a layout and TextInput * Expand to multiple possible layers * Add XKB conversion script * Give ourselves some dead key support * Add license identifier * Improve AltGr * Group the layouts together * And add the common layouts * Expand with regular US international (with regular non-AltGr dead keys) * Add some other scripts (that should do it) * [fix] Avoid rotating up/down in external keyboards along with the device orientation * Log keyboard layout in case of issues * Also listen to PrintScr 'cause that's what the thing is for, isn't it --------- Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
13 lines
613 B
Lua
13 lines
613 B
Lua
describe("ExternalKeyboard event_map_keyboard", function()
|
|
local event_map = dofile("plugins/externalkeyboard.koplugin/event_map_keyboard.lua")
|
|
|
|
it("gives the base punctuation keys their correct names", function()
|
|
assert.are.equal("-", event_map[12]) -- KEY_MINUS
|
|
assert.are.equal("=", event_map[13]) -- KEY_EQUAL
|
|
assert.are.equal("[", event_map[26]) -- KEY_LEFTBRACE
|
|
assert.are.equal("]", event_map[27]) -- KEY_RIGHTBRACE
|
|
assert.are.equal(";", event_map[39]) -- KEY_SEMICOLON (was ":")
|
|
assert.are.equal("`", event_map[41]) -- KEY_GRAVE
|
|
end)
|
|
end)
|