mirror of
https://github.com/edubart/otclient.git
synced 2025-12-20 15:37:11 +01:00
more fixes
* add default key combos to Hotkeys * impement moving countable items holding Ctrl or Shift * fix messagebox incorrent size * implement API in Keyboard to get modifiers key states * minor UI layout fixes * add Ctrl+L logout hotkey
This commit is contained in:
@@ -134,3 +134,19 @@ function Keyboard.unbindKeyPress(keyComboDesc, widget)
|
||||
widget.boundKeyPressCombos[keyComboDesc] = nil
|
||||
end
|
||||
end
|
||||
|
||||
function Keyboard.getModifiers()
|
||||
return g_window.getKeyboardModifiers()
|
||||
end
|
||||
|
||||
function Keyboard.isCtrlPressed()
|
||||
return bit32.band(g_window.getKeyboardModifiers(), KeyboardCtrlModifier) ~= 0
|
||||
end
|
||||
|
||||
function Keyboard.isAltPressed()
|
||||
return bit32.band(g_window.getKeyboardModifiers(), KeyboardAltModifier) ~= 0
|
||||
end
|
||||
|
||||
function Keyboard.isShiftPressed()
|
||||
return bit32.band(g_window.getKeyboardModifiers(), KeyboardShiftModifier) ~= 0
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user