c# - KeyDown not passing all pressed keys when umlaut key is pressed -


to start off: use german keyboard, have keys german umlauts.

description

while writing listener keydown event, noticed keys can't captured @ same time, example if press Ü, o, i, u , p, p get's ignored. if don't press Ü full p, o, i, u. happens combinations Ä, a, s, d, f get's truncated Ä, a, s, although without Ä it's a, s, d, f.

minimal example

i suppose it's easier understand if saw it, here's minimal example of i'm doing. note need create form form1 pasting skeleton outside of form distract example.

public partial class form1 : form {     private list<keys> pressedkeys;     private label label;      public form1()     {         initializecomponent();          pressedkeys = new list<keys>();          label = new label();         label.location = new point(100, 100);          controls.add(label);          keyup += form1_keyup;         keydown += form1_keydown;     }      private void updatelabeltext()     {         label.text = string.join(", ", pressedkeys.select(x => x.tostring()).toarray());     }      private void form1_keydown(object sender, keyeventargs e)     {         var key = e.keydata;          if (!pressedkeys.contains(key))         {             pressedkeys.add(key);             updatelabeltext();         }     }      private void form1_keyup(object sender, keyeventargs e)     {         pressedkeys.remove(e.keydata);         updatelabeltext();     } } 

actual question

is there way capture keyboard events in windows forms, disregarding of key pressed?


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -