These shouldn't use string.byte or raw numbers. Use Spring.GetKeyCode instead, or perhaps KEYSYMS (KEYSYMS is sort of deprecated too but commonly used and acceptable for now). 304 is probably just left shift, test if right shift works. Part of the task is to look around if there's more of these.
|
if key == 304 then |
|
shifted = true |
|
end |
|
if key == 46 and mods.alt then |
|
CycleUnitDisplay(1) -- cycle forward |
|
end |
|
if key == 44 and mods.alt then |
|
local incCylinder = string.byte( "/" ) |
|
local decCylinder = string.byte( "." ) |
|
local targetingMod = string.byte( "\\" ) |
|
|
|
local hideBallisticPlot = string.byte( "n" ) |
|
|
|
function widget:KeyPress(key, mods, isRepeat) |
|
if ( key == incGravity ) then |
|
customMyGravity = customMyGravity + ((isRepeat and 1) or 0.1) |
|
return true |
|
elseif ( key == decGravity ) then |
These shouldn't use
string.byteor raw numbers. UseSpring.GetKeyCodeinstead, or perhaps KEYSYMS (KEYSYMS is sort of deprecated too but commonly used and acceptable for now). 304 is probably just left shift, test if right shift works. Part of the task is to look around if there's more of these.Zero-K/LuaUI/Widgets/gui_attackrange_gl4.lua
Lines 846 to 852 in d050274
Zero-K/LuaUI/Widgets/dbg_ballisticcalculator.lua
Lines 375 to 385 in d050274