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 : Friday, January 11, 2019 6:29:09 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 73
United States

Thanks: 4 times
Was thanked: 12 time(s) in 7 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 Friday, February 15, 2019 8:23:06 PM(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
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.