aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2016-09-29 15:52:53 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2016-09-29 15:52:53 -0400
commita6a07175b45c5ddc8ce71206b1872b03618837ec (patch)
tree41733ff5a14efcdd990d07527bc02242a496b9c3 /core
parent28d94f31cf52459e02bea144eb99662d2b414b3e (diff)
downloadtextadept-a6a07175b45c5ddc8ce71206b1872b03618837ec.tar.gz
textadept-a6a07175b45c5ddc8ce71206b1872b03618837ec.zip
Discard Alt/option modifier for composed ASCII symbols; core/keys.lua
For example this should report 'm{' as just '{' on a Spanish OSX key layout.
Diffstat (limited to 'core')
-rw-r--r--core/keys.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/keys.lua b/core/keys.lua
index 27ccfa91..778e222b 100644
--- a/core/keys.lua
+++ b/core/keys.lua
@@ -206,6 +206,7 @@ local function keypress(code, shift, control, alt, meta, caps_lock)
string.char(code) or M.KEYSYMS[code]
if not key then return end
shift = shift and (code >= 256 or code == 9) -- printable chars are uppercased
+ if OSX and alt and code < 256 then alt = false end -- composed key; ignore alt
local key_seq = (control and CTRL or '')..(alt and ALT or '')..
(meta and OSX and META or '')..(shift and SHIFT or '')..key
--print(key_seq)