From c56d830417b2a2b1b26e13d54bc643fd6771ce9d Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Wed, 13 Sep 2017 12:49:25 +0100
Subject: [PATCH 6/6] ui: drop ac_search and ac_stop

RH-Author: Gerd Hoffmann <kraxel@redhat.com>
Message-id: <20170913124925.17637-7-kraxel@redhat.com>
Patchwork-id: 76336
O-Subject: [RHV-7.4 qemu-kvm-rhev PATCH 6/6] ui: drop ac_search and ac_stop
Bugzilla: 1482388
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
RH-Acked-by: John Snow <jsnow@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>

Both keys exist already: "ac_search" is "find" and "ac_stop" is "stop".

Fixes: 37810e80553c19f0dac3644924895a9bf5c70785
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 20170728063415.27480-1-kraxel@redhat.com
(cherry picked from commit 103dce8f750f4b990dbd24ac231392062c153ec0)
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
 hw/input/ps2.c    | 8 ++++----
 qapi-schema.json  | 5 +----
 ui/input-keymap.c | 8 ++++----
 3 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 776d6ab..bd95d27 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -239,11 +239,11 @@ static const uint16_t qcode_to_keycode_set1[Q_KEY_CODE__MAX] = {
     [Q_KEY_CODE_MAIL] = 0xe06c,
     [Q_KEY_CODE_CALCULATOR] = 0xe021,
     [Q_KEY_CODE_COMPUTER] = 0xe06b,
-    [Q_KEY_CODE_AC_SEARCH] = 0xe065,
+    [Q_KEY_CODE_FIND] = 0xe065,
     [Q_KEY_CODE_AC_HOME] = 0xe032,
     [Q_KEY_CODE_AC_BACK] = 0xe06a,
     [Q_KEY_CODE_AC_FORWARD] = 0xe069,
-    [Q_KEY_CODE_AC_STOP] = 0xe068,
+    [Q_KEY_CODE_STOP] = 0xe068,
     [Q_KEY_CODE_AC_REFRESH] = 0xe067,
     [Q_KEY_CODE_AC_BOOKMARKS] = 0xe066,
 
@@ -379,11 +379,11 @@ static const uint16_t qcode_to_keycode_set2[Q_KEY_CODE__MAX] = {
     [Q_KEY_CODE_MAIL] = 0xe048,
     [Q_KEY_CODE_CALCULATOR] = 0xe02b,
     [Q_KEY_CODE_COMPUTER] = 0xe040,
-    [Q_KEY_CODE_AC_SEARCH] = 0xe010,
+    [Q_KEY_CODE_FIND] = 0xe010,
     [Q_KEY_CODE_AC_HOME] = 0xe03a,
     [Q_KEY_CODE_AC_BACK] = 0xe038,
     [Q_KEY_CODE_AC_FORWARD] = 0xe030,
-    [Q_KEY_CODE_AC_STOP] = 0xe028,
+    [Q_KEY_CODE_STOP] = 0xe028,
     [Q_KEY_CODE_AC_REFRESH] = 0xe020,
     [Q_KEY_CODE_AC_BOOKMARKS] = 0xe018,
 
diff --git a/qapi-schema.json b/qapi-schema.json
index 881c912..37792b6 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4743,11 +4743,9 @@
 # @mail: since 2.10
 # @calculator: since 2.10
 # @computer: since 2.10
-# @ac_search: since 2.10
 # @ac_home: since 2.10
 # @ac_back: since 2.10
 # @ac_forward: since 2.10
-# @ac_stop: since 2.10
 # @ac_refresh: since 2.10
 # @ac_bookmarks: since 2.10
 # altgr, altgr_r: dropped in 2.10
@@ -4777,8 +4775,7 @@
             'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
             'volumeup', 'volumedown', 'mediaselect',
             'mail', 'calculator', 'computer',
-            'ac_search', 'ac_home', 'ac_back', 'ac_forward', 'ac_stop',
-            'ac_refresh', 'ac_bookmarks' ] }
+            'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks' ] }
 
 ##
 # @KeyValue:
diff --git a/ui/input-keymap.c b/ui/input-keymap.c
index 0d9ddde..cdad565 100644
--- a/ui/input-keymap.c
+++ b/ui/input-keymap.c
@@ -123,13 +123,13 @@ static int linux_to_qcode[KEY_CNT] = {
     [KEY_MAIL]           = Q_KEY_CODE_MAIL,
     [KEY_COMPUTER]       = Q_KEY_CODE_COMPUTER,
 
-    [KEY_STOP]           = Q_KEY_CODE_AC_STOP,
+    [KEY_STOP]           = Q_KEY_CODE_STOP,
     [KEY_BOOKMARKS]      = Q_KEY_CODE_AC_BOOKMARKS,
     [KEY_BACK]           = Q_KEY_CODE_AC_BACK,
     [KEY_FORWARD]        = Q_KEY_CODE_AC_FORWARD,
     [KEY_HOMEPAGE]       = Q_KEY_CODE_AC_HOME,
     [KEY_REFRESH]        = Q_KEY_CODE_AC_REFRESH,
-    [KEY_FIND]           = Q_KEY_CODE_AC_SEARCH,
+    [KEY_FIND]           = Q_KEY_CODE_FIND,
 
     [KEY_NEXTSONG]       = Q_KEY_CODE_AUDIONEXT,
     [KEY_PREVIOUSSONG]   = Q_KEY_CODE_AUDIOPREV,
@@ -279,13 +279,13 @@ static const int qcode_to_number[] = {
     [Q_KEY_CODE_MAIL] = 0xec,
     [Q_KEY_CODE_COMPUTER] = 0xeb,
 
-    [Q_KEY_CODE_AC_STOP] = 0xe8,
+    [Q_KEY_CODE_STOP] = 0xe8,
     [Q_KEY_CODE_AC_BOOKMARKS] = 0xe6,
     [Q_KEY_CODE_AC_BACK] = 0xea,
     [Q_KEY_CODE_AC_FORWARD] = 0xe9,
     [Q_KEY_CODE_AC_HOME] = 0xb2,
     [Q_KEY_CODE_AC_REFRESH] = 0xe7,
-    [Q_KEY_CODE_AC_SEARCH] = 0xe5,
+    [Q_KEY_CODE_FIND] = 0xe5,
 
     [Q_KEY_CODE_AUDIONEXT] = 0x99,
     [Q_KEY_CODE_AUDIOPREV] = 0x90,
-- 
1.8.3.1

