Tutorial: fix non-alt keys shown as alt-combos
Lua doesn't have regexes, and "-" has special meaning in match; escape the minus with "%", so it actually matches a minus sign.
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ function tut_key(command)
|
|||||||
return "Ctrl-" .. m;
|
return "Ctrl-" .. m;
|
||||||
end
|
end
|
||||||
|
|
||||||
m = s:match("^M-([A-Z])$"); -- M-X is Alt-X
|
m = s:match("^M%-([A-Z])$"); -- M-X is Alt-X
|
||||||
if (m ~= nil) then
|
if (m ~= nil) then
|
||||||
tut_alt_key = m;
|
tut_alt_key = m;
|
||||||
return "Alt-" .. m;
|
return "Alt-" .. m;
|
||||||
|
|||||||
Reference in New Issue
Block a user