Globalhotkey - Reading the wanted Hotkey from text file

75 Views Asked by At

So I'm using GlobalHotkeys to register my hotkeys. but i want instead of just make a key without being able to change it, so it will be possible to change it from a .txt File. so tried something like that: Code

 using (StreamReader sr = new StreamReader(@"C:\Keys.txt"))
            {
                String line = sr.ReadToEnd();
                ghk = new Hotkeys.GlobalHotkey(Hotkeys.Constants.NOMOD, Keys.Insert, this); }

Now how do i make it read the hotkey that .txt file include ? Need Instead of "Keys.Insert" to be whatever hotkey that inside the text file it's always says: enter image description here

0

There are 0 best solutions below