Opened 6 years ago
Closed 6 years ago
Last modified 6 years ago
#13279 closed Bug Report - General (fixed)
Setup - Edit Keys not reading modifiers correctly
Reported by: | Steve Tremayne | Owned by: | Peter Bennett |
---|---|---|---|
Priority: | minor | Milestone: | 29.2 |
Component: | MythTV - Mythtv-setup | Version: | v29.1 |
Severity: | low | Keywords: | setup key |
Cc: | Ticket locked: | no |
Description
Whilst trying to add a symbol ("@") as a Jump Point, the actual key sequence that is stored is "Shift+@" - ie, I would need to press Shift twice
(I have a UK keyboard, where @=Shift+' a US keyboard would have @=Shift+2 )
So, in the database, this is stored as:
MariaDB [mythconverg]> select * from jumppoints where keylist like 'Shift%'; +-------------+-------------+---------+----------+ | destination | description | keylist | hostname | +-------------+-------------+---------+----------+ | Play music | | Shift+@ | tower | +-------------+-------------+---------+----------+
Manually changing the DB, permits the correct key to be used:
MariaDB [mythconverg]> update jumppoints set keylist='@' where destination ='Play music' and hostname ='tower'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 MariaDB [mythconverg]> select * from jumppoints where keylist like 'Shift%'; Empty set (0.00 sec)
This appears to be an issue in keygrabber.cpp at KeyGrabPopupBox::keyPressEvent() where key_name is set as a simple append of the modifier and the final key.
So, for my UK keyboard, this means I cannot use !"£$%, etc...
I'm not a QT developer, but I'd say the easiest solution here would be to only store the SHIFT modifier if the key pressed was an alphabetical one - this would then still permit ALT+2 (for example)
Currently, there's no way to use many of the symbol keys (without modifying the DB directly), so this limits the user selectable range of inputs.
Fixed in commit f20f976d35 (master) 563a4b829cb(fixes/29)
Frontend Setup: Fix shift key handling in Edit Keys
Detection of key codes in Edit Keys was inconsistent with the way they are checked in the main window. Shift is ignored for cetain key ranges in order to allow alphabetic commands to be case insensitive. This check was not done in Edit Keys. The result was there were certain keys it was not possible to use once assigned, for example "@" or Ctrl-Shift-B.