0

I want to switch to Dvorak layout with C# as I build a program to switch between layouts more easily.

This is what I have:

CultureInfo TypeOfLanguage = CultureInfo.CreateSpecificCulture("en-DV");
System.Threading.Thread.CurrentThread.CurrentCulture = TypeOfLanguage;
InputLanguage l = InputLanguage.FromCulture(TypeOfLanguage);
InputLanguage.CurrentInputLanguage = l;

But for the life of me I can't get this to work.

Tomdrc1
  • 65
  • 1
  • 8
  • [Is this what you're looking for](https://stackoverflow.com/a/38524423/424129)? – 15ee8f99-57ff-4f92-890c-b56153 Jun 04 '18 at 16:57
  • @EdPlunkett I have to be honest I don't know how to implement that, care to help me a littile? thanks alot! – Tomdrc1 Jun 04 '18 at 17:54
  • @EdPlunkett adding it, makeing a class out of it and getting the CultureInfo like in the post above(TypeOfLanguge) and then using the class activate function, didnt work :/ Edit: https://hastebin.com/ujebasizas.cs this is my code so far – Tomdrc1 Jun 04 '18 at 18:02
  • I have no idea what you tried or what went wrong. If you really tried something, show me what and tell me exactly what went wrong. In your question, not in pastebin. – 15ee8f99-57ff-4f92-890c-b56153 Jun 04 '18 at 18:03
  • @EdPlunkett well i made this var `KeyboardLayout k = new KeyboardLayout(TypeOfLanguage); k.Activate(); ` and then i tried to actiavte it (seen above) this is how i got the languge `CultureInfo TypeOfLanguage = CultureInfo.CreateSpecificCulture("en-DV"); ` – Tomdrc1 Jun 04 '18 at 18:08

0 Answers0