Author Topic: Switch language  (Read 1599 times)

sk3l

  • Newbie
  • *
  • Posts: 1
Switch language
« on: January 31, 2018, 04:08:22 pm »
Good day. How change language? i have 2 keyboards on windows, russian and english. When i try using it:
#include "DigiKeyboard.h"

void setup()
{
}

void loop()
{
DigiKeyboard.sendKeyStroke(0);
DigiKeyboard.delay(3000);
DigiKeyboard.sendKeyStroke( MOD_ALT_LEFT , MOD_SHIFT_LEFT);
DigiKeyboard.delay(500);
DigiKeyboard.print(F("notepad"));
DigiKeyboard.delay(600);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(750);
DigiKeyboard.print(F("Hello World!!!"));
DigiKeyboard.sendKeyStroke(KEY_ENTER);
for(;;){ /*empty*/ }
}

i have this:
Фтщеузфв
Руддщ Цщкдв!!!
thanks all for help

MrCookie

  • Newbie
  • *
  • Posts: 21
Re: Switch language
« Reply #1 on: April 30, 2018, 04:45:22 am »
I dont think there is code designed for this. I did find this page that suggests you could possibly write code to change the keyboard layout through a keyboard command:
https://superuser.com/questions/1130835/windows-hotkey-to-change-keyboard-layout

I'm not entirely sure if your allowed to press two keys at the same time with the keyboard library.

trelozakinthinos

  • Newbie
  • *
  • Posts: 1
Re: Switch language
« Reply #2 on: May 07, 2019, 04:14:19 pm »
sk3l,

In linux works as this

DigiKeyboard.sendKeyStroke(0 , MOD_SHIFT_LEFT | MOD_ALT_LEFT);

Probably in windows too but have not check it yet

kaokub99

  • Newbie
  • *
  • Posts: 5
Re: Switch language
« Reply #3 on: August 06, 2019, 01:52:40 am »
Thank you for your advice > สล็อต