key board short cut for copying on OSX
"John Selverian" <[email protected]> Fri, 12 May 2023 16:00:33 -0400
| Newsgroups | gmane.comp.lib.fox-toolkit.user |
|---|---|
| Organization | JAHM Software |
| Message-ID | <[email protected]> |
I'm doing a special copy from a text box on Mac OSX so I need to
intercept the key board copy short-cut keys.. I'm not sure how
general this is but.
On Windows it's Ctl+c and I use this code:
controlMask = CONTROLMASK;
// if Ctr+C
if (event->code == KEY_c &&
(event->state & controlMask))
{
copy = true;
}
On OSX it's the "command" key (that special butterfly key) + c. I
can't figure out the mask type for it. I got it work by running
in the debugger:
// if Cmd+C
if (event->code == 65511 &&
event->state == 0)
{
copy = true;
}
else if (event->code == 97 &&
event->state == 16)
{
// if Cmd+A
selectAll =
true;
}
Kind regards,
js
_______________________________________________
Foxgui-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/foxgui-users
image001.gif
(image/gif, 70 B) - not displayed