mirror of https://github.com/cy384/ssheven.git
fix key translation for option combos (GH bug #15)
This commit is contained in:
parent
5bed63fc83
commit
252bebd10a
11
ssheven.c
11
ssheven.c
|
@ -592,7 +592,15 @@ int handle_keypress(EventRecord* event)
|
|||
}
|
||||
else
|
||||
{
|
||||
// manually send an escape if we have alt option held
|
||||
// if we have alt and the character would be printable ascii, use it
|
||||
if (event->modifiers & optionKey && c >= 32 && c <= 126)
|
||||
{
|
||||
ssh_con.send_buffer[0] = c;
|
||||
ssh_write(ssh_con.send_buffer, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// otherwise manually send an escape if we have alt held
|
||||
if (event->modifiers & optionKey)
|
||||
{
|
||||
ssh_con.send_buffer[0] = '\e';
|
||||
|
@ -611,6 +619,7 @@ int handle_keypress(EventRecord* event)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue