Skip to content
Snippets Groups Projects
  • Daniel P. Berrangé's avatar
    7c388dbd
    ps2: fix sending of PAUSE/BREAK scancodes · 7c388dbd
    Daniel P. Berrangé authored
    
    The processing of the scancodes for PAUSE/BREAK  has been broken since
    the conversion to qcodes in:
    
      commit 8c10e0ba
      Author: Hervé Poussineau <hpoussin@reactos.org>
      Date:   Thu Sep 15 22:06:26 2016 +0200
    
        ps2: use QEMU qcodes instead of scancodes
    
    When using a VNC client, with the raw scancode extension, the client
    will send a scancode of 0xc6 for both PAUSE and BREAK. There is mistakenly
    no entry in the qcode_to_number table for this scancode, so
    ps2_keyboard_event() just generates a log message and discards the
    scancode
    
    When using a SPICE client, it will also send 0xc6 for BREAK, but
    will send 0xe1 0x1d 0x45 0xe1 0x9d 0xc5 for PAUSE. There is no
    entry in the qcode_to_number table for the scancode 0xe1 because
    it is a special XT keyboard prefix not mapping to any QKeyCode.
    Again ps2_keyboard_event() just generates a log message and discards
    the scancode. The following 0x1d, 0x45, 0x9d, 0xc5 scancodes get
    handled correctly. Rather than trying to handle 3 byte sequences
    of scancodes in the PS/2 driver, special case the SPICE input
    code so that it captures the 3 byte pause sequence and turns it
    into a Pause QKeyCode.
    
    Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Message-id: 20170727113243.23991-1-berrange@redhat.com
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    7c388dbd
    History
    ps2: fix sending of PAUSE/BREAK scancodes
    Daniel P. Berrangé authored
    
    The processing of the scancodes for PAUSE/BREAK  has been broken since
    the conversion to qcodes in:
    
      commit 8c10e0ba
      Author: Hervé Poussineau <hpoussin@reactos.org>
      Date:   Thu Sep 15 22:06:26 2016 +0200
    
        ps2: use QEMU qcodes instead of scancodes
    
    When using a VNC client, with the raw scancode extension, the client
    will send a scancode of 0xc6 for both PAUSE and BREAK. There is mistakenly
    no entry in the qcode_to_number table for this scancode, so
    ps2_keyboard_event() just generates a log message and discards the
    scancode
    
    When using a SPICE client, it will also send 0xc6 for BREAK, but
    will send 0xe1 0x1d 0x45 0xe1 0x9d 0xc5 for PAUSE. There is no
    entry in the qcode_to_number table for the scancode 0xe1 because
    it is a special XT keyboard prefix not mapping to any QKeyCode.
    Again ps2_keyboard_event() just generates a log message and discards
    the scancode. The following 0x1d, 0x45, 0x9d, 0xc5 scancodes get
    handled correctly. Rather than trying to handle 3 byte sequences
    of scancodes in the PS/2 driver, special case the SPICE input
    code so that it captures the 3 byte pause sequence and turns it
    into a Pause QKeyCode.
    
    Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Message-id: 20170727113243.23991-1-berrange@redhat.com
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>