Skip to content
Ian Morrish edited this page May 4, 2018 · 2 revisions

You can use this library in Windows PowerShell.
Thanks to imorrish for providing the PowerShell example code.

Example:

add-type -path 'WindowsPowerShell\StreamDeckSharp.dll'

$deckInterface = [StreamDeckSharp.StreamDeck]::OpenDevice()

$POSH = [StreamDeckSharp.StreamDeckKeyBitmap]::FromFile(".\Pictures\PowerShell72x72.png")

$deckInterface.SetKeyBitmap(0, $POSH)

$KeyEvent = Register-ObjectEvent -InputObject $deckInterface -EventName KeyStateChanged -SourceIdentifier buttonPress -Action {write-host $eventArgs.key)}
Clone this wiki locally