Fix forward_unbound_keys test
This commit is contained in:
parent
1444634abb
commit
f1b20f6dc4
@ -263,6 +263,10 @@ class KeyInfo:
|
||||
def text(self):
|
||||
"""Get the text which would be displayed when pressing this key."""
|
||||
text = QKeySequence(self.key).toString()
|
||||
if len(text) > 1:
|
||||
# Special key?
|
||||
return ''
|
||||
|
||||
if not self.modifiers & Qt.ShiftModifier:
|
||||
text = text.lower()
|
||||
return text
|
||||
|
@ -33,14 +33,13 @@ Feature: Keyboard input
|
||||
Scenario: Forwarding special keys
|
||||
When I open data/keyinput/log.html
|
||||
And I set input.forward_unbound_keys to auto
|
||||
And I press the key "x"
|
||||
And I press the key "<F1>"
|
||||
And I press the keys ",<F1>"
|
||||
# <F1>
|
||||
Then the javascript message "key press: 112" should be logged
|
||||
And the javascript message "key release: 112" should be logged
|
||||
# x
|
||||
And the javascript message "key press: 88" should not be logged
|
||||
And the javascript message "key release: 88" should not be logged
|
||||
# ,
|
||||
And the javascript message "key press: 188" should not be logged
|
||||
And the javascript message "key release: 188" should not be logged
|
||||
|
||||
Scenario: Forwarding no keys
|
||||
When I open data/keyinput/log.html
|
||||
|
Loading…
Reference in New Issue
Block a user