
Hello
I have never used OSX, but I know there are issues with modifier keys on it. Correct me if I'm wrong. * Control is called Command, and is used for shortcuts * There is a different key called Control, which is used to emulate a right click and is rarely used for shortcuts * Left Alt is called Option and is used for shortcuts * Right Alt (AltGr) is called Alt and is used for inputting diacritics (third level chooser) * Shift is called Shift
I would like to know the following things, to create an initial solution for Inkscape, with the goal of including it in GTK. - How are those keys reported to GDK, e.g. which bits in the state field are set when they are pressed? GDK knows about Shift, Control, Mod1 (aka Alt), Super (aka Windows key), Hyper and Meta. Which of them correspond to which Mac keys? - Does the above differ in the Quartz version of GTK? I know there are some X server preferences that can be used to alter the mapping. - Is it OK to shorten "Option" as "Opt" in the UI? I know that Command is shortened as Cmd.
My plan is as follows: - Define some constants in ui/tool/event-utils.h that define cross-platform masks for the "state" field of GDK events, so that e.g. INK_STATE_ALT maps to Alt on Linux / Windows and to Option on Macs, and INK_STATE_CONTROL accordingly maps to Control or Command. - Define macros for names of the keys indicated by the above masks. For example INK_KEYNAME_CTRL would expand to "Ctrl" or "Cmd". This name would also be marked for translation. - Adjust all messages that contain modifier names. - Look into modifying GTK so that menu items created from actions have the correct modifier names. Alternatively, derive from Gtk::Action and override the widget creation functions.
PS is there any way to run OSX in a virtual machine? If not, then maybe people who do have access to OSX machines could help.
Regards, Krzysztof