Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
dogtail
dogtail
Commits
e4758e0c
Commit
e4758e0c
authored
Mar 10, 2017
by
Vitezslav Humpa
Browse files
rawinput: two new functions holdKey and releaseKey for keyboard
parent
00763041
Pipeline
#6943465
passed with stages
in 19 minutes and 58 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
dogtail.spec
dogtail.spec
+1
-1
dogtail/rawinput.py
dogtail/rawinput.py
+12
-0
No files found.
dogtail.spec
View file @
e4758e0c
...
...
@@ -5,7 +5,7 @@
Summary: GUI test tool and automation framework
Name: dogtail
Version: 0.9.9
Release:
6.68ec5d8e
%{?dist}
Release:
7.00763041
%{?dist}
License: GPLv2
URL: http://dogtail.fedorahosted.org/
Source0: http://fedorahosted.org/released/dogtail/%{name}-%{version}.tar.gz
...
...
dogtail/rawinput.py
View file @
e4758e0c
...
...
@@ -278,3 +278,15 @@ def keyCombo(comboString):
code
=
keyNameToKeyCode
(
modifier
)
registry
.
generateKeyboardEvent
(
code
,
None
,
KEY_RELEASE
)
doDelay
()
def
holdKey
(
keyName
):
code
=
keyNameToKeyCode
(
keyName
)
registry
.
generateKeyboardEvent
(
code
,
None
,
KEY_PRESS
)
doDelay
()
def
releaseKey
(
keyName
):
code
=
keyNameToKeyCode
(
keyName
)
registry
.
generateKeyboardEvent
(
code
,
None
,
KEY_RELEASE
)
doDelay
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment