shims: Fix a typo in a root.fake_input name

This commit is contained in:
Emmanuel Lepage Vallee 2018-08-05 18:45:01 -04:00
parent a32d892988
commit 0765772c17
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
-- Needed for root.fake_inputs -- Needed for root.fake_input
local keygrabber = {_current_grabber = nil} local keygrabber = {_current_grabber = nil}
local function stop() local function stop()

View File

@ -112,7 +112,7 @@ local fake_input_handlers = {
motion_notify = function() --[[TODO]] end, motion_notify = function() --[[TODO]] end,
} }
function root.fake_inputs(event_type, detail, x, y) function root.fake_input(event_type, detail, x, y)
assert(fake_input_handlers[event_type], "Unknown event_type") assert(fake_input_handlers[event_type], "Unknown event_type")
fake_input_handlers[event_type](detail, x, y) fake_input_handlers[event_type](detail, x, y)
@ -125,19 +125,19 @@ function root._execute_keybinding(modifiers, key)
for _, mod in ipairs(modifiers) do for _, mod in ipairs(modifiers) do
for real_key, mod_name in pairs(conversion) do for real_key, mod_name in pairs(conversion) do
if mod == mod_name then if mod == mod_name then
root.fake_inputs("key_press", real_key) root.fake_input("key_press", real_key)
break break
end end
end end
end end
root.fake_inputs("key_press" , key) root.fake_input("key_press" , key)
root.fake_inputs("key_release", key) root.fake_input("key_release", key)
for _, mod in ipairs(modifiers) do for _, mod in ipairs(modifiers) do
for real_key, mod_name in pairs(conversion) do for real_key, mod_name in pairs(conversion) do
if mod == mod_name then if mod == mod_name then
root.fake_inputs("key_release", real_key) root.fake_input("key_release", real_key)
break break
end end
end end
@ -155,8 +155,8 @@ function root._write_string(string, c)
for i=1, #string do for i=1, #string do
local char = string:sub(i,i) local char = string:sub(i,i)
root.fake_inputs("key_press" , char) root.fake_input("key_press" , char)
root.fake_inputs("key_release", char) root.fake_input("key_release", char)
end end
if c then if c then