Detecting combination keypresses (Control, Alt, Shift)?

Refer to the W3C spec for keyboard events. Several boolean attributes are provided to determine if modifier keys were pressed in conjunction with whatever target key you are interested in. They are: ctrlKey     — The “Control” key was also pressed. shiftKey   — The “Shift” key was also pressed. altKey       … Read more

How to capture Ctrl + Tab and Ctrl + Shift + Tab in WPF?

What KeyDown handler did you have? The code below works for me. The one that gives me trouble is: Alt + Tab, but you didn’t ask for that 😀 public Window1() { InitializeComponent(); AddHandler(Keyboard.KeyDownEvent, (KeyEventHandler)HandleKeyDownEvent); } private void HandleKeyDownEvent(object sender, KeyEventArgs e) { if (e.Key == Key.Tab && (Keyboard.Modifiers & (ModifierKeys.Control | ModifierKeys.Shift)) == (ModifierKeys.Control … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)