0

I've built a WPF app that has a main window

I want to press Ctr+Alt+1 to activate / maximize the window

I then have on the window a 9 tabbed panel

I want to access each tab with hotkey presses with 1-9 respectively (when the main window is active), when the window isnt active and maximized I want to remove the hotkeys

On each tab I have 9 buttons, I want to be able to then activate the button click with hotkeys 1-9 again when the tab is in focus.

I've found an article http://www.codeproject.com/Articles/160441/Using-C-Interfaces-to-Make-Applications-Resilient which gives a nice way to generate the hotkeys with a class but I am getting in a a real mess trying to implement this functionality.

What should I do? (I dont want to use Autohotkey btw)

Is there a better way to achieve this rather than the link above?

user1320651
  • 808
  • 2
  • 15
  • 42
  • Did you see these? : [http://stackoverflow.com/questions/1319425/application-level-shortcut-keys-in-wpf/5318671#5318671][1] [http://stackoverflow.com/questions/1271882/making-global-hotkeys-in-wpf][2] [http://stackoverflow.com/questions/4489118/global-hotkeys-in-wpf][3] – Arash Dec 12 '12 at 20:07

1 Answers1

0

There is no other way to create global hotkeys without pinvoke from WinApi as far as I know. Check this for wpf: http://outcoldman.com/en/blog/show/240

fex
  • 3,488
  • 5
  • 30
  • 46