From 0ac05dbb0fe1d5512d390b17c5d545469f962870 Mon Sep 17 00:00:00 2001 From: thez3ro Date: Wed, 8 Feb 2017 00:11:16 +0100 Subject: [PATCH 1/2] fix #256 space in autotype sequence --- src/autotype/AutoType.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/autotype/AutoType.cpp b/src/autotype/AutoType.cpp index 0c942e728..9d9629c47 100644 --- a/src/autotype/AutoType.cpp +++ b/src/autotype/AutoType.cpp @@ -396,6 +396,9 @@ QList AutoType::createActionFromTemplate(const QString& tmpl, c else if (tmplName.compare("enter",Qt::CaseInsensitive)==0) { list.append(new AutoTypeKey(Qt::Key_Enter)); } + else if (tmplName.compare("space",Qt::CaseInsensitive)==0) { + list.append(new AutoTypeChar(' ')); + } else if (tmplName.compare("up",Qt::CaseInsensitive)==0) { list.append(new AutoTypeKey(Qt::Key_Up)); } From 2975eb315f12f91fe664e54043ba60758569dd6c Mon Sep 17 00:00:00 2001 From: thez3ro Date: Wed, 8 Feb 2017 00:32:22 +0100 Subject: [PATCH 2/2] use space from XCB KeySym --- src/autotype/AutoType.cpp | 2 +- src/autotype/xcb/AutoTypeXCB.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/autotype/AutoType.cpp b/src/autotype/AutoType.cpp index 9d9629c47..40ece6e13 100644 --- a/src/autotype/AutoType.cpp +++ b/src/autotype/AutoType.cpp @@ -397,7 +397,7 @@ QList AutoType::createActionFromTemplate(const QString& tmpl, c list.append(new AutoTypeKey(Qt::Key_Enter)); } else if (tmplName.compare("space",Qt::CaseInsensitive)==0) { - list.append(new AutoTypeChar(' ')); + list.append(new AutoTypeKey(Qt::Key_Space)); } else if (tmplName.compare("up",Qt::CaseInsensitive)==0) { list.append(new AutoTypeKey(Qt::Key_Up)); diff --git a/src/autotype/xcb/AutoTypeXCB.cpp b/src/autotype/xcb/AutoTypeXCB.cpp index f419875dc..a07a916c4 100644 --- a/src/autotype/xcb/AutoTypeXCB.cpp +++ b/src/autotype/xcb/AutoTypeXCB.cpp @@ -435,6 +435,8 @@ KeySym AutoTypePlatformX11::keyToKeySym(Qt::Key key) return XK_Tab; case Qt::Key_Enter: return XK_Return; + case Qt::Key_Space: + return XK_space; case Qt::Key_Up: return XK_Up; case Qt::Key_Down: