
Sorry for top-posting... I think you could kill 2 birds with 1 stone by implementing a keyboard shortcut modification dialog (like a lot of apps have). That way people can easily choose pre-set layouts (more user friendly than moving xml files around), easily customize their own stuff, and on OSX we could have it default to an OSX one (and people could then change it if they don't like it).
Cheers, Josh
On Fri, 2010-03-12 at 02:35 +0100, Krzysztof KosiĆski wrote:
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
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel