use cmd key on Mac OS for some idiomatic shortcuts

akkartik
Nov 12, 2025, 5:51 PM
BKX2TYUGRVEKPGG7B5PK5LUEPMAQLB7J6PFVJBVMSVVJFUMIPYPQC

Dependencies

  • [2] PV2YA7KS subsection headings in a long switch
  • [3] O4RRXNOK bugfix: disallow font size of 0
  • [4] EVMVBLXD bugfix: preserve window position
  • [5] UZQ2LGHQ bugfix: preserve window position
  • [6] 6TBU3VTN explicitly state when operations manage undo
  • [7] A42EMHOQ plumb through all supported args in LÖVE handlers
  • [8] Z3BQO2RK typo
  • [9] JUU6KXPC bugfix: don't clear selection on M-arrow
  • [10] 4J4TX7IS get typed in keystrokes to show on screen on iPad
  • [11] 6ECYOEHY bugfix: obsolete location for attribute
  • [12] 7ZXZGVHM purge obsolete term 'fragment'
  • [13] H6QZ7GRR more precise name
  • [14] 6PRGXS6X bugfix #3 in search UI
  • [15] Z3IQ6A4R bugfix
  • [16] S2MISTTM add state arg to a few functions
  • [17] IFTYOERM line.y -> line_cache.starty in a few more places
  • [18] 2L5MEZV3 experiment: new edit namespace
  • [19] PWDBOOWJ copying to clipboard can never scroll
  • [20] FPY4LO2W make a few names consistent with snake_case
  • [21] SDO4DHNU source: load cursor position from settings
  • [22] TMWSQNZD bugfix in source editor: don't clear selection on M-arrow
  • [23] 4FTOQOPZ bugfix #2 in search UI
  • [24] KMSL74GA support selections in the source editor
  • [25] UUTUPEOJ extract a function
  • [26] S3PNFXTB handle missing cursors in settings
  • [27] 5ZA3BRNY add state arg to a few functions
  • [28] OI4FPFIN support drawings in the source editor
  • [29] OXIU3SJ2 bugfix #3, attempt #2 in search UI
  • [30] LNUHQOGH start passing in Editor_state explicitly
  • [31] BH7BT36L ctrl+a: select entire buffer
  • [32] MUDXM3JI clearing starty is redundant in mutations
  • [33] QCPXQ2E3 add state arg to a few functions
  • [34] PTDO2SOT add state arg to schedule_save
  • [35] UHB4GARJ left/right margin -> left/right coordinates
  • [36] G54H3YG2 get rid of all bifold text
  • [37] 5RDWSYK2 consistently use App names for methods everywhere
  • [38] WK6UK5AJ enhance bugfix of commit a9aa3436f (Dec 2024)
  • [39] KKMFQDR4 editing source code from within the app
  • [40] ISOFHXB2 App.width can no longer take a Text
  • [41] 2CK5QI7W make love event names consistent
  • [42] MTJEVRJR add state arg to a few functions
  • [43] LF7BWEG4 group all editor globals
  • [*] OTIBCAUJ love2d scaffold
  • [*] Z2VZTIXY redo version checks
  • [*] MHOUX5JF experiment: turn off JIT
  • [*] 6LJZN727 handle chords
  • [*] G6OYAYHU paste in text with M-v
  • [*] ZLJGZYQG select text with shift + mouseclick
  • [*] 7EQLPB3O bugfix: don't delete selection when moving cursor

Change contents

  • edit in source_edit.lua at line 398
    [7.513]
    [8.32160]
    local dm = App.default_modifier
  • replacement in source_edit.lua at line 404
    [8.32463][8.12:197]()
    chord ~= 'C-a' and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and chord ~= 'delete' and chord ~= 'C-z' and chord ~= 'C-y' and not App.is_cursor_movement(key) then
    [8.32463]
    [6.417]
    chord ~= dm('a') and chord ~= dm('c') and chord ~= dm('x') and chord ~= 'backspace' and chord ~= 'delete' and chord ~= dm('z') and chord ~= dm('y') and not App.is_cursor_movement(key) then
  • replacement in source_edit.lua at line 433
    [8.159170][8.159170:159199]()
    elseif chord == 'C-f' then
    [8.159170]
    [8.159199]
    elseif chord == dm('f') then
  • replacement in source_edit.lua at line 440
    [8.160402][8.160402:160431]()
    elseif chord == 'C-=' then
    [8.160402]
    [8.160431]
    elseif chord == dm('=') then
  • replacement in source_edit.lua at line 443
    [8.160516][8.160516:160545]()
    elseif chord == 'C--' then
    [8.160516]
    [3.11]
    elseif chord == dm('-') then
  • replacement in source_edit.lua at line 448
    [3.142][8.160630:160659](),[8.160630][8.160630:160659]()
    elseif chord == 'C-0' then
    [3.142]
    [8.160659]
    elseif chord == dm('0') then
  • replacement in source_edit.lua at line 452
    [8.160737][8.160737:160766]()
    elseif chord == 'C-z' then
    [8.160737]
    [8.160873]
    elseif chord == dm('z') then
  • replacement in source_edit.lua at line 465
    [8.161311][8.161311:161340]()
    elseif chord == 'C-y' then
    [8.161311]
    [8.161447]
    elseif chord == dm('y') then
  • replacement in source_edit.lua at line 479
    [8.161829][8.165:194]()
    elseif chord == 'C-a' then
    [8.161829]
    [8.194]
    elseif chord == dm('a') then
  • replacement in source_edit.lua at line 482
    [8.331][8.161829:161858](),[8.7497][8.161829:161858](),[8.161829][8.161829:161858]()
    elseif chord == 'C-c' then
    [8.7497]
    [8.161858]
    elseif chord == dm('c') then
  • replacement in source_edit.lua at line 487
    [8.161946][8.161946:161975]()
    elseif chord == 'C-x' then
    [8.161946]
    [6.473]
    elseif chord == dm('x') then
  • replacement in source_edit.lua at line 493
    [8.162224][8.162224:162253]()
    elseif chord == 'C-v' then
    [8.162224]
    [8.162360]
    elseif chord == dm('v') then
  • replacement in source.lua at line 144
    [8.169798][4.13:70]()
    local os = love.system.getOS()
    if os == 'Linux' then
    [8.169798]
    [4.70]
    if OS == 'Linux' then
  • replacement in run.lua at line 71
    [5.130][5.130:187]()
    local os = love.system.getOS()
    if os == 'Linux' then
    [5.130]
    [5.187]
    if OS == 'Linux' then
  • edit in main.lua at line 83
    [46.298]
    [47.8]
    OS = love.system.getOS()
  • edit in keychord.lua at line 37
    [49.258]
    [50.1663]
    -- use idiomatic cmd key on Mac OS, ctrl elsewhere
    function App.default_modifier(key)
    if OS == 'OS X' then
    return 's-'..key
    else
    return 'C-'..key
    end
    end
  • edit in keychord.lua at line 66
    [51.893]
    [51.893]
    function App.default_modifier_down()
    if OS == 'OS X' then
    return App.cmd_down()
    else
    return App.ctrl_down()
    end
    end
  • edit in edit.lua at line 392
    [7.3715]
    [8.6800]
    local dm = App.default_modifier
  • replacement in edit.lua at line 398
    [8.10752][8.0:185]()
    chord ~= 'C-a' and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and chord ~= 'delete' and chord ~= 'C-z' and chord ~= 'C-y' and not App.is_cursor_movement(key) then
    [8.10752]
    [6.726]
    chord ~= dm('a') and chord ~= dm('c') and chord ~= dm('x') and chord ~= 'backspace' and chord ~= 'delete' and chord ~= dm('z') and chord ~= dm('y') and not App.is_cursor_movement(key) then
  • replacement in edit.lua at line 427
    [8.11758][8.11758:11787]()
    elseif chord == 'C-f' then
    [8.11758]
    [8.7538]
    elseif chord == dm('f') then
  • replacement in edit.lua at line 434
    [2.25][8.11962:11991](),[8.7755][8.11962:11991](),[8.103883][8.11962:11991](),[8.11962][8.11962:11991]()
    elseif chord == 'C-=' then
    [2.25]
    [8.15]
    elseif chord == dm('=') then
  • replacement in edit.lua at line 437
    [8.6814][8.12057:12086](),[8.12057][8.12057:12086]()
    elseif chord == 'C--' then
    [8.6814]
    [3.158]
    elseif chord == dm('-') then
  • replacement in edit.lua at line 442
    [3.289][8.12152:12181](),[8.6842][8.12152:12181](),[8.12152][8.12152:12181]()
    elseif chord == 'C-0' then
    [3.289]
    [8.133]
    elseif chord == dm('0') then
  • replacement in edit.lua at line 446
    [2.36][8.12236:12265](),[8.6870][8.12236:12265](),[8.12236][8.12236:12265]()
    elseif chord == 'C-z' then
    [2.36]
    [8.2587]
    elseif chord == dm('z') then
  • replacement in edit.lua at line 459
    [8.12717][8.12717:12746]()
    elseif chord == 'C-y' then
    [8.12717]
    [8.2624]
    elseif chord == dm('y') then
  • replacement in edit.lua at line 473
    [8.13212][8.501:530]()
    elseif chord == 'C-a' then
    [8.13212]
    [8.530]
    elseif chord == dm('a') then
  • replacement in edit.lua at line 476
    [8.657][8.13212:13241](),[8.13212][8.13212:13241]()
    elseif chord == 'C-c' then
    [8.657]
    [8.3829]
    elseif chord == dm('c') then
  • replacement in edit.lua at line 481
    [8.13403][8.13403:13432]()
    elseif chord == 'C-x' then
    [8.13403]
    [6.782]
    elseif chord == dm('x') then
  • replacement in edit.lua at line 487
    [8.551][8.13660:13689](),[8.13660][8.13660:13689]()
    elseif chord == 'C-v' then
    [8.551]
    [8.13768]
    elseif chord == dm('v') then