anchor.diff:     2dup input output
   ;
   
  -
   1 BUFFER: (term-io-char-buf)
   
   : term-io-emit ( char -- )
  
positive.code: 
  : input  ( dev-str dev-len -- )
     open-dev ?dup IF
        \ Close old stdin:
        s" stdin" get-chosen IF
           decode-int nip nip ?dup IF close-dev THEN
        THEN
        \ Now set the new stdin:
        encode-int s" stdin"  set-chosen
     THEN
  ;
  
  
negative.code: \ - if it's an hv console, use hvterm-key?
  \ otherwise it will always return false
  : term-io-key?  ( -- true|false )
    stdin @ ?dup IF
        >r \ store ihandle on return stack
        s" device_type" r@ ihandle>phandle ( propstr len phandle )
        get-property ( true | data dlen false )
  