commit 0abdc3dd59e1e21f93e4bbce640b29886b9e29df Author: Kornel Benko <kor...@lyx.org> Date: Fri May 19 12:46:17 2017 +0200
keytests: Handle function-keys for xvkbd too Function keys are sent to xvkbd as e.g. \[F15], so we should not split a sequence like "\C\[F15]" into two text pieces. (Do it like other keys not having a digit in their name (e.g. \[Return]) ) --- development/autotests/keytest.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/development/autotests/keytest.py b/development/autotests/keytest.py index 2edd86b..f5dfa6f 100755 --- a/development/autotests/keytest.py +++ b/development/autotests/keytest.py @@ -384,7 +384,7 @@ def sendKeystringLocal(keystr, LYX_PID): sys.stdout.flush() Axreg = re.compile(r'^(.*)\\Ax([^\\]*)(.*)$') -returnreg = re.compile(r'(\\\[[A-Z][a-z]+\])(.*)$') +returnreg = re.compile(r'(\\\[[A-Z][a-z0-9]+\])(.*)$') # recursive wrapper around sendKeystringLocal() # handling \Ax-entries @@ -420,7 +420,7 @@ def sendKeystringAx(line, LYX_PID): if line != "": sendKeystringLocal(line, LYX_PID) -specialkeyreg = re.compile(r'(.+)(\\[AC]([a-zA-Z]|\\\[[A-Z][a-z]+\]).*)$') +specialkeyreg = re.compile(r'(.+)(\\[AC]([a-zA-Z]|\\\[[A-Z][a-z0-9]+\]).*)$') # Split line at start of each meta or controll char def sendKeystringAC(line, LYX_PID): @@ -433,7 +433,7 @@ def sendKeystringAC(line, LYX_PID): else: sendKeystringAx(line, LYX_PID) -controlkeyreg = re.compile(r'^(.*\\\[[A-Z][a-z]+\])(.*\\\[[A-Z][a-z]+\])(.*)$') +controlkeyreg = re.compile(r'^(.*\\\[[A-Z][a-z0-9]+\])(.*\\\[[A-Z][a-z0-9]+\])(.*)$') # Make sure, only one of \[Return], \[Tab], \[Down], \[Home] etc are in one sent line # e.g. split the input line on each keysym def sendKeystringRT(line, LYX_PID):