Skip to content
  • Simon Glass's avatar
    input: Add a function to add a keycode to the existing set · 3a85e436
    Simon Glass authored
    
    
    Most keyboards can be scanned to produce a list of the keycodes which are
    depressed. With the i8042 keyboard this scanning is done internally and
    only the processed results are returned.
    
    In this case, when a key is pressed, a 'make' code is sent. When the key
    is released a 'break' code is sent. This means that the driver needs to
    keep track of which keys are pressed. It also means that any protocol error
    can lead to stuck keys.
    
    In order to support this type of keyboard, add a function when can be used
    to provide a single keycode and either add it to the list of what is pressed
    or remove it from the list. Then the normal input_send_keycodes() function
    can be used to actually do the decoding work.
    
    Add debugging to display the ASCII characters written to the input queue
    also.
    
    Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
    Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
    3a85e436