private void Application_Startup(object sender, StartupEventArgs e) { StartupShortcut.Check(); System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(AppleWirelessKeyboard.Properties.Settings.Default.Language); TrayIcon.Show(); Keyboard = new KeyboardHandler(new Profile(AppleWirelessKeyboard.Properties.Settings.Default.Profile)); Keyboard.Start(); Microsoft.Win32.SystemEvents.PowerModeChanged += new Microsoft.Win32.PowerModeChangedEventHandler(SystemEvents_PowerModeChanged); }
void AppleKeyboardHID_KeyDown(AppleKeyboardSpecialKeys key) { switch (key) { case AppleKeyboardSpecialKeys.Fn: KeyboardListener.ModifierFn = true; break; case AppleKeyboardSpecialKeys.Eject: KeyboardHandler.HandleEject(); break; } }
bool KeyboardListener_KeyDown(KeyboardListener.KeyHookEventArgs e) { return(KeyboardHandler.HandleKeyDown(e)); }