mirror of
https://github.com/cy384/ssheven.git
synced 2026-05-15 14:15:58 -06:00
improve cmd key handling
This commit is contained in:
parent
cfb121c270
commit
24065d8312
1 changed files with 11 additions and 3 deletions
14
ssheven.c
14
ssheven.c
|
|
@ -260,11 +260,19 @@ void event_loop(void)
|
|||
case keyDown:
|
||||
case autoKey: // autokey means we're repeating a held down key event
|
||||
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';
|
||||
ssh_con.send_buffer[0] = c;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue