Project

General

Profile

Global Keyboard Shortcuts

Added by Blaine Johs about 9 years ago

Hello,

What is the best way to implement global keyboard shortcuts? Wt::WApplication::globalKeyPressed() works to capture keystrokes only when NO widget has focus. Is there an easy way to capture and process keystrokes independent of which widget has focus?

Thanks,

Blaine


Replies (1)

RE: Global Keyboard Shortcuts - Added by Blaine Johs about 9 years ago

OK, this was much easier than I thought, as the ancestors of each widget can handle the key press events. I just connected the keyWentDown event to the main container widgets in my application, and it worked. It was tricky to figure out which key combinations would work in both Mac OS X and Windows thought.

    (1-1/1)