Skip to content

barry006/KeyBoardDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This C# script utilizes Windows native functions via DllImport to detect and display the current keyboard layout within a Unity environment.

It employs GetKeyboardLayout and GetKeyboardLayoutName from user32.dll to retrieve the layout identifier (layoutId) and map it to descriptive names such as "QWERTY" or "AZERTY" using a predefined dictionary.

The OnGUI method updates Unity's graphical user interface to visually present the current keyboard layout and its identifier.

Window keyboard identifier : https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-input-locales-for-windows-language-packs?view=windows-11

An untested Macintosh and Linux version is also available.

About

KeyBoard Detector

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages