20 Nov, 2015

7 commits

  • When sending LED update command to an i8042 compatible keyboard,
    bit1 is 'Num Lock' and bit2 is 'Caps Lock' in the data byte. But
    input library defines bit1 as 'Caps Lock' and bit2 as 'Num Lock'.
    This causes a wrong LED to be set on an i8042 compatible keyboard.
    Change the LED state bits to be i8042 compatible, and change the
    keyboard flags as well.

    Signed-off-by: Bin Meng
    Acked-by: Simon Glass

    Bin Meng
     
  • Add a function which returns a new keyboard LED value when the LEDs need
    updating.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • Add support for the German keymap, taken from i8042.c. This can be selected
    when the input library it initialised.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • Generally the input library handles processing of a list of scanned keys.
    Repeated keys need to be generated based on a timer in this case, since all
    that is provided is a list of keys current depressed.

    Keyboards which do their own scanning will resend codes when they want to
    inject a repeating key. Provide a function which tells the input library to
    accept repeating keys and not to try to second-guess the caller.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • 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: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • Require the caller to add the keycode translation tables separately so that
    it can select which ones to use. In a later patch we will add the option to
    add German tables.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • The read_keys() method in input is passed a struct input_config. Add a
    device pointer there so that we can find out the device that is referred
    to with driver model.

    Once all drivers are converted we can update the input structure to use
    driver model instead.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     

24 Jul, 2013

1 commit


20 Oct, 2012

1 commit

  • To support Non-ASCII keys (ex, Fn, PgUp/Dn, arrow keys, ...), we need to
    translate key code into escape sequence.

    (Updated by sjg@chromium.org to move away from a function to store
    keycodes, so we can easily record how many were sent. We now need to
    return this from input_send_keycodes() so we know whether keys were
    generated.)

    Signed-off-by: Hung-Te Lin
    Signed-off-by: Simon Glass
    Signed-off-by: Tom Rini

    Hung-Te Lin
     

16 Oct, 2012

1 commit


15 May, 2012

1 commit

  • Add a module which understands converting key codes (or scan codes)
    to ASCII characters. It includes FIFO support and can call back to
    drivers to read new characters when its FIFO is empty.

    Keycode maps are provided for un-modified, shift and ctrl keys.

    The plan is to use this module where such mapping is required.

    Signed-off-by: Simon Glass
    Signed-off-by: Tom Warren

    Simon Glass