Is there a reference for what these keys and key combinations do by default on Windows?
Is there a way to override their behaviors so I can use them in my app?
I want to catch these key events:
Spacebar (this opens a menu, I really don’t want it to do that)
shift + mousewheel (seems to work okay)
shift + control + mousewheel (crashes the app)
shift + alt + mousewheel (opens up the windows start menu, interferes with my app)
A problem seems to be what object is catching the keys. On Mac, the keys automatically get caught in the listbox, but it seems on Windows, the keys are caught somewhere else, I don’t know where. I have no other key catching code in the app, just in the listbox.
I just created a small test app with no code. None of the manipulations you list does anything. Because none of them is a standard Windows system shortcut.
In Windows, the only modifier that triggers menus without app code is Alt.
You keep saying it works in Mac. If you posted some code, it would certainly help.
I told you that in the very same post you apparently did not completely read :
Alt is the Windows shortcut for menus. Pressed by itself it selects the first menu. Pressed in combination with the title of a menu (for instance E for Edit), it drops it down.
So all this leads to a related question, maybe a more useful question:
On Mac, we have 3 keys we can use in almost any combination with any other keys in our apps:
Command
Option
Control
This give a wide variety of possible key commands.
A problem is, not all of those command can transfer to Windows. In fact, it appears the majority of them can’t be duplicated in Windows. We get a behavior with Alt that makes it virtually unusable as far as I can see. There is no way to just “replace” the Command or Option or Control key to get a parallel set of key combinations on Windows.
This seems pretty a basic issue for x-plat development but I have not relied much on keyboard shortcuts before, so it’s a bit new to me.
Is there some standard approach for dealing with this problem?
On the Mac you can use keys with NO modifier (thats joy)
Not so Windows
So you do end up with a set of Mac key mappings and one that mat be similar but not identical on Windows
So on OS X youmight use Cmd+Option
On Windows you might use Alt+Shift or Alt+Ctrl
We basically have a giant spreadsheet for the IDE of the ones we’ve assigned, ones the OS reserves etc
On Mac, we can use key combinations for things other than menu shortcuts, but on Windows this seems problematic, especially with Alt, it seems that should only be used for Menu shortcuts. Is that correct?
Nor should you. You should try to use the keys that make sense, and your users will expect, on each platform. Windows OS pretty much reserves the Alt key.