StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Rob  
#1 Posted : Saturday, January 12, 2019 1:29:09 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
Simple plug-in to get the keyboard layout value (integer), e.g. 1033 is US English

https://www.strokesplus.net/files/KeyboardPlugin.dll

Download the file into your StrokesPlus.net\Plug-Ins folder and Reload S+.net from the tray icon.

NOTE: Windows may mark the DLL as unsafe or blocked. Right click the DLL and select Properties, there will be an option to unblock it.

Example script:

var kb = new Keyboard();
sp.MessageBox(kb.GetCurrentKeyboardLayout(), "Keyboard Layout");

Keyboard Layout Values

Note the values listed are in hex, but this function returns an int, so US English = 0x00000409 (hex) = 1033 (int)

Edited by user Saturday, February 16, 2019 3:23:06 AM(UTC)  | Reason: Added note about Windows blocking the DLL after download

thanks 1 user thanked Rob for this useful post.
Ss2ng on 1/14/2019(UTC)
Users browsing this topic
Similar Topics
"Alt" & keyboard layout (Bug Reports)
by NikosColev 2/14/2020 9:50:40 PM(UTC)
does not working on another keyboard layout (General Discussion)
by Mans 7/1/2019 4:10:46 PM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.