ui: convert GTK and SDL1 frontends to keycodemapdb

The x_keycode_to_pc_keycode and evdev_keycode_to_pc_keycode
tables are replaced with automatically generated tables.
In addition the X11 heuristics are improved to detect running
on XQuartz and XWin X11 servers, to activate the correct OS-X
and Win32 keycode maps.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 20180117164717.15855-3-berrange@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Daniel P. Berrange 2018-01-17 16:47:15 +00:00 committed by Gerd Hoffmann
parent ed7b2624f2
commit 2ec78706d1
9 changed files with 302 additions and 319 deletions

View file

@ -1,7 +1,7 @@
/*
* QEMU SDL display driver
* QEMU X11 keymaps
*
* Copyright (c) 2003 Fabrice Bellard
* Copyright (c) 2017 Red Hat, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -25,8 +25,8 @@
#ifndef QEMU_X_KEYMAP_H
#define QEMU_X_KEYMAP_H
uint8_t translate_xfree86_keycode(const int key);
#include <X11/Xlib.h>
uint8_t translate_evdev_keycode(const int key);
const guint16 *qemu_xkeymap_mapping_table(Display *dpy, size_t *maplen);
#endif