A modular and customizable on-screen-keyboard for AutoHotkey projects.
- Displays physical and virtual keypresses
- Can be controlled with dpad
- Includes light and dark mode
- Easy to add or adjust layouts (in __New)
To include in your script: #Include osk.ahk
To initialize object: Global keyboard := new OSK("dark", "qwerty")
Main methods:
keyboard.toggle()
- Show and hide keyboard on the current monitorkeyboard.ChangeIndex(Direction)
- "Up", "Down", "Left", "Right"; For dpad navigationkeyboard.RetrieveDPadSelected()
- Returns the button currently highlighted by the dpadkeyboard.HandleOSKClick(key:="")
- Send the specified key through the keyboard
If you want to use an object name other than keyboard
you will have to change the calls in the #If
statements and the HandleOSKClick()
function to your object's name.
If you run the script directly (rather than including it elsewhere) the following hotkeys will be activated to allow testing the keyboard.
Ctrl + Ins
: Toggle keyboardUp
,Down
,Left
,Right
: Change DPad indexEnter
: Send DPad selected
For an example implementation see Controller_MKB.