aboutsummaryrefslogtreecommitdiff
path: root/core/ext
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2008-11-02 21:44:53 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2008-11-02 21:44:53 -0500
commit35e35e5e6b77e895a78eef96982eea808e202aba (patch)
treec34cc7825a8a740244c06b1573be4e51bd535e27 /core/ext
parentfcf078c25d81ca2a9b75f6baec18ce7eb477a8f3 (diff)
downloadtextadept-35e35e5e6b77e895a78eef96982eea808e202aba.tar.gz
textadept-35e35e5e6b77e895a78eef96982eea808e202aba.zip
Fixed key handling and arg handling for Mac.
Diffstat (limited to 'core/ext')
-rw-r--r--core/ext/keys.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/ext/keys.lua b/core/ext/keys.lua
index 22ec2def..00d5804f 100644
--- a/core/ext/keys.lua
+++ b/core/ext/keys.lua
@@ -124,9 +124,6 @@ local function keypress(code, shift, control, alt)
local buffer, textadept = buffer, textadept
local string, pcall = string, pcall
local keys = _G.keys
- control = control and CTRL or ''
- shift = shift and SHIFT or ''
- alt = alt and ALT or ''
local key
--print(code, string.char(code))
if code < 256 then
@@ -144,6 +141,9 @@ local function keypress(code, shift, control, alt)
if not KEYSYMS[code] then return end
key = KEYSYMS[code]
end
+ control = control and CTRL or ''
+ shift = shift and SHIFT or ''
+ alt = alt and ALT or ''
local key_seq = string.format('%s%s%s%s', control, shift, alt, key)
if #keychain > 0 and key_seq == keys.clear_sequence then