1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-04 21:12:47 -05:00

On OS X, be able to configure either Option or Command as Meta.

Personally I like using Command as the Esc-prefixing Meta key in
terminal sessions, because it occupies the same physical keyboard
position as the Alt key that I'm used to using on non-Macs. OS X
Terminal uses Option for that purpose (freeing up Command for the
conventional Mac keyboard shortcuts, of course), so I anticipate
differences of opinion.

Hence, here's a pair of OSX-specific config options which permit a
user to set either, or neither, or both of those modifier keys to
function as the terminal Meta key.
This commit is contained in:
Simon Tatham
2015-09-01 19:00:25 +01:00
parent 097d5ffb37
commit dc253b3c51
5 changed files with 43 additions and 6 deletions

View File

@ -129,6 +129,22 @@ void gtk_setup_config_box(struct controlbox *b, int midsession, void *win)
conf_checkbox_handler,
I(CONF_utf8_override));
#ifdef OSX_META_KEY_CONFIG
/*
* On OS X, there are multiple reasonable opinions about whether
* Option or Command (or both, or neither) should act as a Meta
* key, or whether they should have their normal OS functions.
*/
s = ctrl_getset(b, "Terminal/Keyboard", "meta",
"Choose the Meta key:");
ctrl_checkbox(s, "Option key acts as Meta", 'p',
HELPCTX(no_help),
conf_checkbox_handler, I(CONF_osx_option_meta));
ctrl_checkbox(s, "Command key acts as Meta", 'm',
HELPCTX(no_help),
conf_checkbox_handler, I(CONF_osx_command_meta));
#endif
if (!midsession) {
/*
* Allow the user to specify the window class as part of the saved