Alt/Option on Mac #273
Answered
by
orbitalquark
eric-hemasystems
asked this question in
Q&A
Replies: 4 comments 2 replies
-
Whenever I have issues with keybindings, I temporarily edit *core/keys.lua* to show keybindings in the statusbar as I type them: https://github.com/orbitalquark/textadept/blob/1dbcff60ec070a1881090ce8669ff1214244188f/core/keys.lua#L180
ui.statusbar_text = string.format('"%s"', key_seq)
The Alt/option key on macOS is represented by 'alt': https://orbitalquark.github.io/textadept/api.html#key-sequences. Also, key modifiers are case-sensitive. Make sure you are using 'ctrl+alt' for example.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Hmm. Thanks for the info. I will have to investigate this when I have some time.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
After investigating this, Apple's Alt/Option key functions as a compose key and would insert an extended ascii character (which is invalid UTF-8 and displays as a weird character in the statusbar). I ended up uncommenting the "print(code, M.KEYSYMS[code], shift, control, alt, cmd, caps)" statement in *core/keys.lua* and ran Textadept from the terminal in order to find the codes being emitted by macOS. For example, if 141 is emitted, then you'd use `keys[string.char(141)] = ...` to bind that key to an action. Note that Textadept removes the 'alt' modifier for composed keys.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
eric-hemasystems
-
Those should be fine. Textadept only removes the 'alt' modifier for composed keys.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to make some shortcuts that basically run
Ctrl+Alt+1
....Ctrl+Alt+9
for each number on the keyboard. This works great on Linux but on Mac I can't seem to activate the shortcut. On Mac theAlt
key is labeledOption
so I should press should beCtrl
,Option
, and some number.I've confirmed that my shortcut is installed by hitting
Ctrl-E
to bring up the Lua input and then typingkeys['Ctrl+Alt+3']()
and it executes just fine. Is there something preventing the Option/Alt key from working? I tried some other predefined shortcuts like "Next View" (Option
,Shift
,Right
) and that also seemed to not work.Beta Was this translation helpful? Give feedback.
All reactions