     handle>> f 0 IDirectInputDevice8W::RunControlPanel ole32-error ;
 
 M: dinput-game-input-backend read-keyboard
-    +keyboard-device+ get [ 256 get-device-state ]
-    [ <keyboard-state> ] [ f ] with-acquisition ;
+    +keyboard-device+ get
+    [ +keyboard-state+ get [ keys>> underlying>> get-device-state ] keep ]
+    [ ] [ f ] with-acquisition ;
 
 dinput-game-input-backend game-input-backend set-global

        pov-up pov-up-right pov-right pov-down-right
        pov-down pov-down-left pov-left pov-up-left
    } ; inline

: >keys ( byte-array -- array )
    [ HEX: 80 bitand c-bool> ] { } map-as ;

: >axis ( long -- float )
    32767 - 32767.0 /f ;

    [ drop pov-neutral ]
    [ 2750 + 4500 /i pov-values nth ] if ;
: >buttons ( alien length -- array )
    memory>byte-array <keys-array> ;

: (fill-if) ( controller-state DIJOYSTATE2 ? quot -- )
    [ drop ] compose [ 2drop ] if ; inline
