aboutsummaryrefslogtreecommitdiff
path: root/core/ext
diff options
context:
space:
mode:
Diffstat (limited to 'core/ext')
-rw-r--r--core/ext/keys.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/ext/keys.lua b/core/ext/keys.lua
index b87b27de..7b62c151 100644
--- a/core/ext/keys.lua
+++ b/core/ext/keys.lua
@@ -130,7 +130,16 @@ local function keypress(code, shift, control, alt)
local key
--print(code, string.char(code))
if code < 256 then
- key = string.char(code):lower()
+ key_seq = key_seq..string.char(code):lower()
+ if MAC and not shift and not control and not alt then
+ local ch = string.char(code)
+ -- work around native GTK-OSX's handling of Alt key
+ if ch:match('[^A-Za-z ]') then
+ buffer:add_text(ch)
+ textadept.events.handle('char_added', ch)
+ return true
+ end
+ end
else
if not KEYSYMS[code] then return end
key = KEYSYMS[code]