mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-12 16:57:32 -04:00
require exact modifier key presses for key combos in /bin/edit
This commit is contained in:
parent
03c0fda530
commit
6fd7fc07e1
@ -556,7 +556,7 @@ getKeyBindHandler = function(code)
|
||||
if type(keybinds) == "table" and keyBindHandlers[command] then
|
||||
for _, keybind in ipairs(keybinds) do
|
||||
if type(keybind) == "table" then
|
||||
local alt, control, shift, key
|
||||
local alt, control, shift, key = false, false, false
|
||||
for _, value in ipairs(keybind) do
|
||||
if value == "alt" then alt = true
|
||||
elseif value == "control" then control = true
|
||||
@ -564,9 +564,9 @@ getKeyBindHandler = function(code)
|
||||
else key = value end
|
||||
end
|
||||
local keyboardAddress = term.keyboard()
|
||||
if (not alt or keyboard.isAltDown(keyboardAddress)) and
|
||||
(not control or keyboard.isControlDown(keyboardAddress)) and
|
||||
(not shift or keyboard.isShiftDown(keyboardAddress)) and
|
||||
if (alt == not not keyboard.isAltDown(keyboardAddress)) and
|
||||
(control == not not keyboard.isControlDown(keyboardAddress)) and
|
||||
(shift == not not keyboard.isShiftDown(keyboardAddress)) and
|
||||
code == keyboard.keys[key] and
|
||||
#keybind > resultWeight
|
||||
then
|
||||
|
Loading…
x
Reference in New Issue
Block a user