mirror of https://github.com/cy384/ssheven.git
improve cmd key handling
This commit is contained in:
parent
cfb121c270
commit
24065d8312
14
ssheven.c
14
ssheven.c
|
@ -260,11 +260,19 @@ void event_loop(void)
|
||||||
case keyDown:
|
case keyDown:
|
||||||
case autoKey: // autokey means we're repeating a held down key event
|
case autoKey: // autokey means we're repeating a held down key event
|
||||||
c = event.message & charCodeMask;
|
c = event.message & charCodeMask;
|
||||||
if (c && (event.modifiers & cmdKey)) // apple key
|
// if we have a key and command and it's not autorepeating
|
||||||
|
if (c && (event.modifiers & cmdKey) && event.what != autoKey)
|
||||||
{
|
{
|
||||||
if (c == 'q') exit_event_loop = 1;
|
switch(c)
|
||||||
|
{
|
||||||
|
case 'q':
|
||||||
|
exit_event_loop = 1;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (c)
|
}
|
||||||
|
else if (c)
|
||||||
{
|
{
|
||||||
if ('\r' == c) c = '\n';
|
if ('\r' == c) c = '\n';
|
||||||
ssh_con.send_buffer[0] = c;
|
ssh_con.send_buffer[0] = c;
|
||||||
|
|
Loading…
Reference in New Issue