isxkb

Isxkb is a lightweight interface object between Sphinx-aware programs and the Sphinx keyboard driver (sxkb).

 

Note that any object in a program's object hierarchy can use isxkb, not just the top object. This allows keyboard input anywhere in a program and can be very useful.

Spin interface methods 

Example

' A simple demonstration of isxkb

' Note: Sphinx-aware programs don't need clock settings

obj

  kb : "isxkb"

  term : "isxtv"

  f: "sxfile"

pub Main | ch

  term.str( string("Are you alive? ") )

  ch := kb.getkey

  term.out( ch ) ' echo keystroke

  term.out( 13 )

  if ch == "y" or ch == "Y"

    term.str( string("That's a relief", 13) )

  else

    term.str( string("Uh-oh", 13) )

  ' Our work here is done. Now back to the command shell:

  f.Open( string("sphinx.bin"), "R" )

  f.Execute( 0 )