(self, queues, values, codepage, check_full)
Initilise keyboard state.
Initilise keyboard state.
Initilise keyboard state .
def __init__(self, queues, values, codepage, check_full):
        """Initilise keyboard state."""
        self._values = values
        # needed for wait() in wait_char()
        self._queues = queues
        # key queue (holds bytes); ring buffer of length 16
        self.buf = KeyboardBuffer(queues, 16, check_full)
        # INP(&H60) scancode
        self.last_scancode = 0
        # active status of caps, num, scroll, alt, ctrl, shift modifiers
        self.mod = 0
        # store for alt+keypad ascii insertion
        self.keypad_ascii = b''
        # ignore caps lock, let OS handle it
        # this is now switched off hard-coded, but logic remains for now
        self._ignore_caps = True
        # pre-inserted keystrings
        self._codepage = codepage
        # stream buffer
        self._stream_buffer = deque()
        # redirected input stream has closed
        self._input_closed = False
        # expansion buffer for keyboard macros
        # expansion vessel holds codepage chars
        self._expansion_vessel = []
        # f-key macros
        self._key_replace = list(DEFAULT_MACROS)
def __init__ ( self , queues , values , codepage , check_full ) : self . _values = values # needed for wait() in wait_char() self . _queues = queues # key queue (holds bytes); ring buffer of length 16 self . buf = KeyboardBuffer ( queues , 16 , check_full ) # INP(&H60) scancode self . last_scancode = 0 # active status of caps, num, scroll, alt, ctrl, shift modifiers self . mod = 0 # store for alt+keypad ascii insertion self . keypad_ascii = b'' # ignore caps lock, let OS handle it # this is now switched off hard-coded, but logic remains for now self . _ignore_caps = True # pre-inserted keystrings self . _codepage = codepage # stream buffer self . _stream_buffer = deque ( ) # redirected input stream has closed self . _input_closed = False # expansion buffer for keyboard macros # expansion vessel holds codepage chars self . _expansion_vessel = [ ] # f-key macros self . _key_replace = list ( DEFAULT_MACROS )