better support other keyboard layouts
Dependencies
- [2]
A27WWJ6Hdocument a few more keyboard primitives - [3]
3GITFJZKfix a comment - [4]
BKX2TYUGuse cmd key on Mac OS for some idiomatic shortcuts - [5]
3HDWCPDIbugfix: include shift keys in modifier_down - [6]
ZLJGZYQGselect text with shift + mouseclick - [7]
MTJEVRJRadd state arg to a few functions - [8]
UGLYKBDAfix tests on Mac OS - [9]
ETM7ENJRsome helpers - [10]
2CK5QI7Wmake love event names consistent - [11]
KKMFQDR4editing source code from within the app - [12]
6LJZN727handle chords - [13]
BYG5CEMVsupport for naming points - [14]
O4ZGUPZNimproved handling of other keyboard layouts - [15]
4QQBMWLLregression: typing uppercase letters in text - [16]
N2NUGNN4include a brief reference enabling many useful apps - [17]
GIG6OV3Gport keyboard layout handling to source editor - [18]
3MAZEQK5add state arg to Text.textinput - [19]
DRFE3B3Zmouse buttons are integers, not strings - [20]
5UG5PQ6Kundo commit 861c57b533 - [21]
7IDHIAYIrename modifier_down to key_down - [22]
G6OYAYHUpaste in text with M-v - [23]
XDB5D7H7some early returns should be asserts - [*]
BULPIBEGbeginnings of a module for the text editor - [*]
FS2ITYYHrecord a known issue - [*]
UEE5W7WJdocument one more shortcut - [*]
BH7BT36Lctrl+a: select entire buffer
Change contents
- replacement in text.lua at line 146
if App.any_modifier_down() thenif App.key_down(t) then-- The modifiers didn't change the key. Handle it in keychord_press.returnelse-- Key mutated by the keyboard layout. Continue below.end-- textinput events can occur on chords with the shift key or AltGr key-- but not for ctrl, alt or cmd/super/guiif App.ctrl_down() or App.alt_down() or App.cmd_down() thenreturn - replacement in source_text.lua at line 223
if App.any_modifier_down() thenif App.key_down(t) then-- The modifiers didn't change the key. Handle it in keychord_press.returnelse-- Key mutated by the keyboard layout. Continue below.end-- textinput events can occur on chords with the shift key or AltGr key-- but not for ctrl, alt or cmd/super/guiif App.ctrl_down() or App.alt_down() or App.cmd_down() thenreturn - edit in reference.md at line 342
* `App.any_modifier_down()` -- returns `true` if any of the modifier keys iscurrently pressed. - replacement in keychord.lua at line 46[4.826]→[5.1663:1696](∅→∅),[5.258]→[5.1663:1696](∅→∅),[5.1696]→[5.186:267](∅→∅),[5.287]→[5.186:267](∅→∅)
function App.any_modifier_down()return App.ctrl_down() or App.alt_down() or App.shift_down() or App.cmd_down()-- Many keyboard layouts use a special altGr key to insert additional-- printable characters. SDL/LÖVE can't represent altGr distinctly.function alt_gr_down()return App.key_down('ralt') - edit in keychord.lua at line 52
-- altGr is a separate modifier and never considered with alt or ctrl,-- regardless of layout. - edit in keychord.lua at line 55
if alt_gr_down() then return false end - edit in keychord.lua at line 60
if alt_gr_down() then return false end - edit in README.md at line 37[27.91][28.665]
Only left alt is supported, because many keyboard layouts use right alt likeshift for typing characters, and I don't know how to figure out the currentlayout.