bugfix: include shift keys in modifier_down

[?]
May 29, 2022, 6:01 AM
3HDWCPDIQ2R7N63GQIABVE5L63U42CLKNLVJQFKBOZH4BMJQA5XAC

Dependencies

Change contents

  • edit in keychord.lua at line 2
    [3.487]
    [3.487]
    Modifiers = {'lctrl', 'rctrl', 'lalt', 'ralt', 'lshift', 'rshift', 'lgui', 'rgui'}
  • replacement in keychord.lua at line 6
    [3.1642][3.538:687](),[3.538][3.538:687]()
    if key == 'lctrl' or key == 'rctrl' or key == 'lalt' or key == 'ralt' or key == 'lshift' or key == 'rshift' or key == 'lgui' or key == 'rgui' then
    [3.1642]
    [3.687]
    if array.find(Modifiers, key) then
  • replacement in keychord.lua at line 33
    [2.287][2.287:427]()
    local down = love.keyboard.isDown
    return down('lctrl') or down('rctrl') or down('lalt') or down('ralt') or down('lgui') or down('rgui')
    [2.287]
    [2.427]
    return array.any(Modifiers, love.keyboard.isDown)
    end
    array = {}
    function array.find(arr, elem)
    for i,x in ipairs(arr) do
    if x == elem then
    return i
    end
    end
    return nil
    end
    function array.any(arr, f)
    for i,x in ipairs(arr) do
    local result = f(x)
    if result then
    return result
    end
    end
    return false