Tuesday, July 2, 2013

keyboard right click shortcut

There isn't one for left-click, though spacebar and Enter are often usable.
Right-clicking is usually a request for a context-sensitive menu which is performed on the keyboard either by clicking the context key (menu/pointer looking thing usually to the right of the space bar between Alt and Ctrl (along with the Windows key), or by pressing Shift+F10.
Note that about 65% of programmers who write Windows applications think that they should open a context menu in response to a right-click (WM_RBUTTONUP--which a true amateur thinks is WM_RBUTTONDOWN). This is of course incorrect. The correct event to open a context menu from is WM_CONTEXTMENU (which is sent immediately following WM_RBUTTONUP or if the keyboard key is pressed).
What that means is that 65% of applications out there won't respond to the keyboard request for a context menu.

No comments:

Post a Comment