qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 2df9f5: ui/win32-kbd-hook: handle AltGr in a


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 2df9f5: ui/win32-kbd-hook: handle AltGr in a hook procedure
Date: Thu, 21 May 2020 09:00:35 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 2df9f5718df7722924699a3754f99165e2f4ae35
      
https://github.com/qemu/qemu/commit/2df9f5718df7722924699a3754f99165e2f4ae35
  Author: Volker Rümelin <address@hidden>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    A include/ui/win32-kbd-hook.h
    M stubs/Makefile.objs
    A stubs/win32-kbd-hook.c
    M ui/Makefile.objs
    A ui/win32-kbd-hook.c

  Log Message:
  -----------
  ui/win32-kbd-hook: handle AltGr in a hook procedure

Import win32 keyboard hooking code from project spice-gtk. This
patch removes the extra left control key up/down input events
inserted by Windows for the right alt key up/down input events
with international keyboard layouts. Additionally there's some
code to grab the keyboard.

The next patches will use this code.

Only Windows needs this.

Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: bd593d2cd9932ea20593c4e6960d84fd59854130
      
https://github.com/qemu/qemu/commit/bd593d2cd9932ea20593c4e6960d84fd59854130
  Author: Volker Rümelin <address@hidden>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M ui/gtk.c

  Log Message:
  -----------
  ui/gtk: fix handling of AltGr key on Windows

Wire up the keyboard hooking code on Windows to fix the AltGr
key and improve keyboard grabbing.

Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 0c4b1a7dc597499814d6222da4c95cbf9de68ba6
      
https://github.com/qemu/qemu/commit/0c4b1a7dc597499814d6222da4c95cbf9de68ba6
  Author: Volker Rümelin <address@hidden>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M ui/gtk.c

  Log Message:
  -----------
  ui/gkt: release all keys on grab-broken-event

There is no way to grab the Ctrl-Alt-Del key combination on
Windows. This key combination will leave all three keys in a
stuck condition. This patch uses the grab-broken-event to
release the keys.

Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 9ef99eccb10002d785279d1fd1dc5b0f4c295bef
      
https://github.com/qemu/qemu/commit/9ef99eccb10002d785279d1fd1dc5b0f4c295bef
  Author: Volker Rümelin <address@hidden>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M ui/gtk.c

  Log Message:
  -----------
  ui/gtk: remove unused code

This code was last used before commit 2ec78706d1 "ui: convert
GTK and SDL1 frontends to keycodemapdb".

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: fd7c1bea17e4aaea45c00b37b7a2af5dd72b17f8
      
https://github.com/qemu/qemu/commit/fd7c1bea17e4aaea45c00b37b7a2af5dd72b17f8
  Author: Volker Rümelin <address@hidden>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M ui/gtk.c

  Log Message:
  -----------
  ui/gtk: remove unused variable ignore_keys

Since the removal of GTK2 code in commit 89d85cde75 the code
around ignore_keys is unused. See commit 1a01716a30 "gtk: Avoid
accel key leakage into guest on console switch" why it was only
needed for GTK2.

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 830473455fb94e7362c464a9b7667dca1004a5a4
      
https://github.com/qemu/qemu/commit/830473455fb94e7362c464a9b7667dca1004a5a4
  Author: Volker Rümelin <address@hidden>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M ui/sdl2.c

  Log Message:
  -----------
  ui/sdl2: fix handling of AltGr key on Windows

Wire up the keyboard hooking code on Windows to fix the AltGr
key and improve keyboard grabbing.

Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 7dafc6793a5b1806bec4b1f233561b809c5cc649
      
https://github.com/qemu/qemu/commit/7dafc6793a5b1806bec4b1f233561b809c5cc649
  Author: Volker Rümelin <address@hidden>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M ui/sdl2.c

  Log Message:
  -----------
  ui/sdl2: start in full screen with grab enabled

QEMU with SDL 1.2 display used to enable keyboard and mouse grab-
bing when started in full screen. The SDL 2.0 code tries to do
the same but fails to enable grabbing because sdl_grab_start(0)
returns early. To do it's work the sdl_grab_start() function
needs a pointer to a sdl2_console structure.

Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 20a37f2fa3873ad62c31b40f55f2218ec9ff470b
      
https://github.com/qemu/qemu/commit/20a37f2fa3873ad62c31b40f55f2218ec9ff470b
  Author: Volker Rümelin <address@hidden>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M ui/sdl2-input.c
    M ui/trace-events

  Log Message:
  -----------
  ui/sdl2-input: use trace-events to debug key events

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: d3953bf7978521b6373cb8101f594cc44b0efa9e
      
https://github.com/qemu/qemu/commit/d3953bf7978521b6373cb8101f594cc44b0efa9e
  Author: Volker Rümelin <address@hidden>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M ui/gtk.c

  Log Message:
  -----------
  ui/gtk: don't pass on win keys without keyboard grab

Without keyboard grab Windows currently handles the two win keys
and the key events are also sent to the guest. This is undesir-
able. Only one program should handle key events. This patch ap-
plies commit c68f74b02e "win32: do not handle win keys when the
keyboard is not grabbed" from project spice-gtk to ui/gtk.c to
fix this problem.

Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 145419274621f846385d35e609c051d4cbdd39a7
      
https://github.com/qemu/qemu/commit/145419274621f846385d35e609c051d4cbdd39a7
  Author: Volker Rümelin <address@hidden>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M ui/gtk.c

  Log Message:
  -----------
  ui/gtk: use native keyboard scancodes on Windows

Since GTK 3.22 the function gdk_event_get_scancode() is
available. On Windows this function returns keyboard scancodes
and some extended flags. These raw keyboard scancodes are much
better suited for this use case than the half-cooked win32
virtual-key codes because scancodes report the key position on
the keyboard and the positions are independent of national
language settings.

Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 7b23d121f913709306e678a3289edc813f3a7463
      
https://github.com/qemu/qemu/commit/7b23d121f913709306e678a3289edc813f3a7463
  Author: Volker Rümelin <address@hidden>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M configure
    M ui/gtk.c

  Log Message:
  -----------
  ui: increase min required GTK version to 3.22.0

Based on a mail on the qemu-devel mailing list at
https://lists.nongnu.org/archive/html/qemu-devel/2020-05/msg02909.html
and some internet research the GTK3 versions on supported
platforms are:

    RHEL-7.4: 3.22.10
    RHEL-7.5: 3.22.26
    Debian (Stretch): 3.22.11
    Debian (Buster): 3.24.5
    OpenBSD (Ports): 3.22.30
    FreeBSD (Ports): 3.22.29
    OpenSUSE Leap 15: 3.22.30
    SLE12-SP2: Unknown
    SLE15: 3.22.30
    Ubuntu (Bionic): 3.22.30
    Ubuntu (Focal): 3.24.18
    macOS (Homebrew): 3.22.30

This justifies increasing the minimum required GTK version in
QEMU to 3.22.0.

Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: ad5a59124c251abd7e725fa3f6a3308c06d6b486
      
https://github.com/qemu/qemu/commit/ad5a59124c251abd7e725fa3f6a3308c06d6b486
  Author: Peter Maydell <address@hidden>
  Date:   2020-05-21 (Thu, 21 May 2020)

  Changed paths:
    M configure
    A include/ui/win32-kbd-hook.h
    M stubs/Makefile.objs
    A stubs/win32-kbd-hook.c
    M ui/Makefile.objs
    M ui/gtk.c
    M ui/sdl2-input.c
    M ui/sdl2.c
    M ui/trace-events
    A ui/win32-kbd-hook.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kraxel/tags/ui-20200520-pull-request' 
into staging

ui: windows keyboard fixes for gtk & sdl.
ui: require GTK 3.22 or newer.

# gpg: Signature made Wed 20 May 2020 09:41:48 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <address@hidden>" [full]
# gpg:                 aka "Gerd Hoffmann <address@hidden>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <address@hidden>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20200520-pull-request:
  ui: increase min required GTK version to 3.22.0
  ui/gtk: use native keyboard scancodes on Windows
  ui/gtk: don't pass on win keys without keyboard grab
  ui/sdl2-input: use trace-events to debug key events
  ui/sdl2: start in full screen with grab enabled
  ui/sdl2: fix handling of AltGr key on Windows
  ui/gtk: remove unused variable ignore_keys
  ui/gtk: remove unused code
  ui/gkt: release all keys on grab-broken-event
  ui/gtk: fix handling of AltGr key on Windows
  ui/win32-kbd-hook: handle AltGr in a hook procedure

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/8b9112e4aef0...ad5a59124c25



reply via email to

[Prev in Thread] Current Thread [Next in Thread]