pax_global_header 0000666 0000000 0000000 00000000064 14276714407 0014526 g ustar 00root root 0000000 0000000 52 comment=bdb110f952032a0a7cc3fb58a9fcd7e6064c7fb2
autokey-0.96.0/ 0000775 0000000 0000000 00000000000 14276714407 0013303 5 ustar 00root root 0000000 0000000 autokey-0.96.0/.coveragerc 0000664 0000000 0000000 00000001330 14276714407 0015421 0 ustar 00root root 0000000 0000000 [paths]
source = lib
[run]
branch = true
parallel = true
source =
lib
[html]
directory = test_coverage_report_html
show_contexts = true
skip_empty = true
[report]
show_missing = true
precision = 1
; Eventually will want to fail if coverage is below this percentage.
; fail_under = 40
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain about missing debug-only code:
def __repr__
if self\.debug
# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
autokey-0.96.0/.github/ 0000775 0000000 0000000 00000000000 14276714407 0014643 5 ustar 00root root 0000000 0000000 autokey-0.96.0/.github/ISSUE_TEMPLATE.md 0000664 0000000 0000000 00000002565 14276714407 0017360 0 ustar 00root root 0000000 0000000 ## Classification:
(Pick one: Bug, Crash/Hang/Data loss, Enhancement, Feature (new), Performance, UI/Usability)
## Reproducibility:
(Pick one: Always, Sometimes, Rarely, Unable, I didn't try)
## AutoKey version:
(Paste in your AutoKey version and, if the problem is known to be present in more than one version, please list them all.)
## Used GUI:
(Pick one: Gtk, Qt, Both):
## Installed via:
(Pick one: PPA, pip3, Git, package manager, etc.)
## Linux distribution:
(Provide information about your Linux distribution and its release or version number.)
## Summary:
(Provide a brief summary of the problem.)
## Steps to reproduce:
- I do this.
- Then I do that.
## Expected result:
(Explain what should happen.)
## Actual result:
(Explain what actually happens.)
## Screenshot (if applicable):
(Include one or more screenshots of the issue by dragging the image file(s) here to help with debugging.)
## Verbose output (if applicable):
(Include the output from launching AutoKey via the `autokey-gtk --verbose` or `autokey-qt --verbose` command to help with debugging. Please upload the output somewhere accessible or paste it into a code block here, enclosing it in triple backticks.)
```
Example code block. Replace this with your output content.
```
## Notes:
(Describe debugging steps you've taken, a workaround you've figured out, or any other information you think we might need.)
autokey-0.96.0/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 14276714407 0017026 5 ustar 00root root 0000000 0000000 autokey-0.96.0/.github/ISSUE_TEMPLATE/bug.yaml 0000664 0000000 0000000 00000014756 14276714407 0020504 0 ustar 00root root 0000000 0000000 ---
name: "Open a new issue using our issue-reporting form:"
description: >
Having an issue with AutoKey? Answer a few questions in our report
form to help us solve the issue as quickly as possible. Please click
the "Get started" button when you're ready to begin.
labels: new issue
body:
# HAS THIS ISSUE ALREADY BEEN REPORTED?
- type: checkboxes
id: existing-issue
attributes:
label: Has this issue already been reported?
description: >
If someone else has [already filled out a bug report for the
issue you're having](https://github.com/autokey/autokey/issues),
consider contributing to that report instead of creating a new
one. If your issue hasn't been reported yet, check this box and
continue filling out this form.
options:
- label: I have searched through the existing issues.
required: true
# IS THIS A QUESTION RATHER THAN AN ISSUE?
- type: checkboxes
id: is-a-question-not-an-issue
attributes:
label: Is this a question rather than an issue?
description: >+
When creating AutoKey issues, whenever you have a question (as opposed to an issue), it's better to post it on our [Google list](https://groups.google.com/forum/#!forum/autokey-users) or in our [Gitter chat](https://gitter.im/autokey/autokey). The list is more user-oriented, whereas more technical questions will get a better answer on Gitter.
Both of these venues have a number of active users, so you are likely to get more, better, and faster answers on them than in here on GitHub, where only our very busy developers and a few users see the posts. We also prefer to have the developers developing rather than taking time to answer questions and manage issues that the user-community could handle for them.
options:
- label: This is not a question.
required: true
# WHAT TYPE OF ISSUE IS THIS?
- type: dropdown
id: classification
attributes:
label: What type of issue is this?
multiple: false
options:
- Bug
- Crash/Hang/Data loss
- Documentation
- Enhancement
- Performance
- UI/Usability
validations:
required: false
# WHICH LINUX DISTRIBUTION DID YOU USE?
- type: textarea
id: linux-distribution
attributes:
label: Which Linux distribution did you use?
description: >
Provide information about your Linux distribution and its
release or version number.
validations:
required: false
# WHICH AUTOKEY GUI DID YOU USE?
- type: dropdown
id: gui
attributes:
label: Which AutoKey GUI did you use?
multiple: false
options:
- GTK
- Qt
- Both
validations:
required: false
# WHICH AUTOKEY VERSION DID YOU USE?
- type: textarea
id: autokey-version
attributes:
label: Which AutoKey version did you use?
description: >
Paste in your AutoKey version and, if the problem is known
to be present in more than one version, please list them all.
validations:
required: false
# HOW DID YOU INSTALL AUTOKEY?
- type: textarea
id: installation-method
attributes:
label: How did you install AutoKey?
description: >
Describe where your copy of AutoKey came from.
placeholder: From Git, pip3, a PPA, my distribution's repository, etc.
validations:
required: false
# CAN YOU DESCRIBE THE ISSUE?
- type: textarea
id: summary
attributes:
label: Can you briefly describe the issue?
description: Provide a short summary of the problem.
validations:
required: false
# CAN THE ISSUE BE REPRODUCED?
- type: dropdown
id: reproducibility
attributes:
label: Can the issue be reproduced?
description: null
multiple: false
options:
- Always
- I didn't try
- N/A
- Rarely
- Sometimes
- Unable
validations:
required: false
# WHAT ARE THE STEPS TO RREPRODUCE THE ISSUE?
- type: textarea
id: steps-to-reproduce
attributes:
label: What are the steps to reproduce the issue?
description: >
Provide the steps that need to be taken to reproduce the
behavior. For example:
placeholder: |
1. Do this.
2. Then do that.
3. Etc.
validations:
required: false
# WHAT SHOULD HAVE HAPPENED?
- type: textarea
id: expected-result
attributes:
label: What should have happened?
description: Provide a description of what you expected to happen.
validations:
required: false
# WHAT ACTUALLY HAPPENED?
- type: textarea
id: actual-result
attributes:
label: What actually happened?
description: Provide a description of what actually happened.
validations:
required: false
# DO YOU HAVE SCREENSHOTS?
- type: textarea
id: screenshot
attributes:
label: Do you have screenshots?
description: >
If you have one or more screenshots of the issue, include
them by dragging the image file(s) below:
validations:
required: false
# CAN YOU PROVIDE THE OUTPUT OF THE AUTOKEY COMMAND?
- type: textarea
id: verbose-output
attributes:
label: Can you provide the output of the AutoKey command?
description: >
This is only needed for some bugs. Sometimes, the output from
starting AutoKey from a terminal window with either the
```autokey-gtk``` or ```autokey-qt``` command provides helpful
messages that can be pasted below. If those aren't sufficient or
if your issue involves a crash, throws an exception, or produces
other unexpected results,
[running an AutoKey trace](https://github.com/autokey/autokey-python2/wiki/Problem-Reporting-Guide)
may be helpful. You can do this by running AutoKey from a
terminal window with the ```autokey-gtk --verbose``` or
```autokey-qt --verbose``` command, then recreating your issue,
then closing AutoKey, and then pasting any messages it produces
below:
render: bash
validations:
required: false
# ANYTHING ELSE?
- type: textarea
id: notes
attributes:
label: Anything else?
description: >
Describe any debugging steps you've taken, a workaround you've
figured out, or any other information you think we might need,
including links or references.
validations:
required: false
...
autokey-0.96.0/.github/workflows/ 0000775 0000000 0000000 00000000000 14276714407 0016700 5 ustar 00root root 0000000 0000000 autokey-0.96.0/.github/workflows/build.yml 0000664 0000000 0000000 00000011527 14276714407 0020530 0 ustar 00root root 0000000 0000000 # This workflow will install Python dependencies, build debs, and upload to pypi.
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python build
on:
push:
tags:
- 'v*.*.*'
# Always manually run on CI
branches: [ CI ]
jobs:
build_deb:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.1]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('pip-requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
sudo apt update
sudo apt install $(cat apt-requirements.txt)
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov wheel
pip install -r pip-requirements.txt
- name: Build .deb
# Developed from instructions on the wiki
# The debian/ folder contains dependencies etc, so all this action needs to do is activate the process.
run: |
debian/build.sh
mkdir debs
mv ../*.deb debs
- name: Upload built debs as artifacts
uses: actions/upload-artifact@master
with:
name: debs
path: debs
build_pypi_wheel:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.1]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('pip-requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
sudo apt update
sudo apt install $(cat apt-requirements.txt)
python -m pip install --upgrade pip
pip install build
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Upload built dist as artifact
uses: actions/upload-artifact@master
with:
name: dist
path: dist/
release:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.1]
needs: [build_pypi_wheel, build_deb]
steps:
- uses: actions/checkout@v2
with:
# Fetch all history so that we get tags.
fetch-depth: 0
# Waits for checks to complete before releasing.
- name: Wait on tests
uses: lewagon/wait-on-check-action@master
with:
ref: ${{ github.ref }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
check-name: 'pytest (3.10.1)'
- name: Download built dist as artifact
uses: actions/download-artifact@master
with:
name: dist
path: dist/
- name: Download built debs as artifacts
uses: actions/download-artifact@master
with:
name: debs
path: ../debs
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Create a release and attach files
run: |
git fetch --tags --force
origin="$(git config --get remote.origin.url)"
# Will get tag name only if a tag triggered this workflow.
# tagname="${GITHUB_REF#refs/tags/}"
# Use this to get the most recent tag on this branch rather than the tag triggering the current build.
tagname="$(git describe --tags --abbrev=0 --match "v*.*.*")"
prerelease="--prerelease"
notes="[See here for changelog for this release]($origin/blob/$tagname/CHANGELOG.rst)"
# If we are a tag and on master, should be a full release not a prerelease
if git branch --all --contains tags/$tagname | grep --silent "master"; then
prerelease=""
fi
# Include other files by adding them as additional arguments
gh release create "$tagname" ../debs/*.deb --title "$tagname" --notes "$notes" $prerelease
# ../autokey-common_${{ github.ref }}_all.deb
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
autokey-0.96.0/.github/workflows/python-test.yml 0000664 0000000 0000000 00000012162 14276714407 0021723 0 ustar 00root root 0000000 0000000 # This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python test
on:
push:
# Test on tags to ensure that the version metadata has been updated in tag as well.
tags:
- '*'
branches: [ CI, master, develop, beta ]
pull_request:
branches: [ master, develop, beta ]
jobs:
Lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.10.1]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('pip-requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
sudo apt update
sudo apt install $(cat apt-requirements.txt)
python -m pip install --upgrade pip
pip install flake8 wheel
pip install -r pip-requirements.txt
- name: Python Code Quality and Lint
uses: ricardochaves/python-lint@v1.3.0
with:
python-root-list: "lib/autokey tests"
use-pylint: false
use-pycodestyle: false
use-flake8: true
use-black: false
use-mypy: false
use-isort: false
extra-pylint-options: ""
extra-pycodestyle-options: ""
# select = stop the build if there are Python syntax errors or undefined names
# exit-zero treats all errors as warnings.
# "_" is part of gettext, not actually a built-in, but used almost
# everywhere without explicit definition.
# The GitHub editor is 127 chars wide.
extra-flake8-options: >
--count
--select=E9,F63,F7,F82
--show-source
--statistics
--builtins=_
--max-complexity=10
--max-line-length=127
extra-black-options: ""
extra-mypy-options: ""
extra-isort-options: ""
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.10.1]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('pip-requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
sudo apt update
sudo apt install $(cat apt-requirements.txt)
python -m pip install --upgrade pip
pip install flake8 tox pytest pytest-cov wheel
pip install -r pip-requirements.txt
- name: Test with tox and pytest
run: |
tox -e clean,coverage,report
- name: Upload pytest test results
uses: actions/upload-artifact@v2
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
- name: Archive test coverage report
run: |
tar -cvzf test_coverage_report-${{ matrix.python-version }}.tar.gz test_coverage_report_html/
- name: Upload test coverage report
uses: actions/upload-artifact@v2
with:
name: test_coverage_report-${{ matrix.python-version }}.tar.gz
path: test_coverage_report-${{ matrix.python-version }}.tar.gz
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
test-install:
# Just runs basic app options to ensure pip installation has included relevant imports and put app in path.
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.10.1]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install OS dependencies only
run: |
sudo apt update
sudo apt install $(cat apt-requirements.txt)
python -m pip install --upgrade pip
pip install dbus-python gobject pygobject PyQt5 qscintilla
- name: Test installation
run: |
pip install "${GITHUB_WORKSPACE}"
autokey-gtk --help
# qt xcb module requires a display to connect to, so won't work.
# export QT_DEBUG_PLUGINS=1
# autokey-qt --help
autokey-0.96.0/.gitignore 0000664 0000000 0000000 00000000211 14276714407 0015265 0 ustar 00root root 0000000 0000000 *.html
*.bak
*.swp
__pycache__
*.egg-info
*.pyc
.tox/
# IDE's
.idea
.vscode
test_coverage_annotated_source/
test_coverage_report_html/
autokey-0.96.0/ACKNOWLEDGMENTS 0000664 0000000 0000000 00000004204 14276714407 0015453 0 ustar 00root root 0000000 0000000 Thanks go to Sam Peterson (peabody17), the original developer of
AutoKey, for allowing me to join his project and not objecting
when I more or less took it over.
My sincerest thanks to tiheum, the designer of the Faenza icon set for
Linux. One of his designs is the basis of AutoKey's icon and his superb
icon set makes my desktop a joy to use.
I'd like to pass my gratitude to all who have made donations to the
AutoKey project: theoa, jschall, mfseeker, jflevi, keycombat, rkcallahan,
bkudria, riffian, and many others.
Many thanks to the developers of xdotool, from which I copied the idea
of dynamically modifying the keyboard map to send non-mapped characters.
I also want to thank the developers of Phrase Express. Their
application's UI was the inspiration for AutoKey's configuration window.
The below are the original acknowledgements from Sam Peterson.
---------------------------------------------------------------------
Above all, I wish to thank my wife Margaret Tam. You're always there
when I need you. You're always there to support me throughout the
good and bad in life. I love you my dear.
I'd like to thank Eddie Bell for his keylogger example. It was the
turning point in my early development of the program that gave me what
I needed for monitoring keyboard input.
I'd especially like to thank Peter Liljenberg for writing the
python-xlib extension, without which this software wouldn't have been
possible.
I'd like to acknowledge Textpander, Texter and the Autohotkey
developers whose software was an inspiration to this software.
I'd like to thank all of the people on the Ubuntu forums who have
given me their feedback and/or tried the program (in no particular
order or preference): Vadi, Scarath, jackocleebrown, ugm6hr,
RebounD11, Bungo Pony, forrestcupp, kevdog, conehead77,
PartisanEntity, DjBones, antisocialist, Specter043, Linuxratty,
SanskritFritz, Martje_001, tribaal, Vitamin-Carrot. I apologize
profusely if I have forgotten to mention anyone.
I'd like to thank SourceForge for hosting the project.
Lastly I'd like to thank Guido van Rossum for authoring the Python
programming language, and RMS for gcc and GNU Emacs.
autokey-0.96.0/CHANGELOG.rst 0000664 0000000 0000000 00000077523 14276714407 0015342 0 ustar 00root root 0000000 0000000 =========
Changelog
=========
Version 0.96.0
============================
Important misc changes
----------------------
- Script and phrase metadata are no longer stored as hidden dotfiles. Existing scripts should be automatically converted, but if switch back to versions prior to this one, you will need to copy or symlink them back to dotfile form.
- Scripting API files are now in Python packages, which may require adjusting imports if you have scripts that import them directly.
- Change the default phrase send mode to `ctrl+v` (paste using clipboard) rather than sending keys one at a time.
- This version represents some significant refactoring since the previous update, so bug reports will be highly appreciated.
Features
---------
Scripting API
^^^^^^^^^^^^^
**engine API object**
- Deprecated: Confusingly named engine.create_abbreviation() and engine.create_hotkey() are deprecated and will be removed in the future. Use engine.create_phrase() with appropriate arguments instead.
- Extended: engine.create_phrase() now supports multiple new optional arguments, allowing to fully configure the created phrase. It can set everything the GUI can do.
- New: Scripts can use engine.get_triggered_abbreviation() to read which abbreviation triggered it’s execution.
The function returns a tuple containing the abbreviation and the trigger character (the character that 'completed' or 'confirmed' the abbreviation. Both tuple elements are None if the script was not triggered by an abbreviation. The trigger character is None if the script was configured to 'trigger immediately'. The function always returns a tuple, so direct tuple unpacking like abbreviation, trigger = engine.get_triggered_abbreviation() will always work.
- Allow creation of 'temporary' hotkeys and whole folders (which do not persist between sessions).
- Allow overriding existing hotkeys when creating phrases with hotkeys.
- Allow creation of folders.
- Add `set_clipboard_image` methods for both Gtk and Qt. Takes a file path to an image to load into the clipboard.
**keyboard API object**
- keyboard.send_keys() got a new optional parameter send_mode, allowing to specify how the given text is sent. It basically offers the same pasting options as are available to AutoKey Phrases.
- keyboard.send_keys() now raises a TypeError instead of a generic AssertionError, if parameters don’t match the expected types.
**New clipboard API method**
- Change the default phrase send mode to `ctrl+v` (paste using clipboard) rather than sending keys one at a time.
**New mouse API object**
- Add mouse drag, click and scroll options to the API.
Command line interface
++++++++++++++++++++++
- Added a --version command line switch. It prints the current AutoKey version on the standard output and then exits.
Graphical user interfaces
+++++++++++++++++++++++++
- (GTK) Warn user about missing required and optional programs on startup.
- (GTK) UI will now update when changes are detected to watched files.
- (GTK) refresh UI if script files are modified externally
- Use system monospace font
- Add setting to change GtkSourceView theme, (defaults to classic).
Other
+++++
- Add `wait_for_keyevent` scripting function.
- Rewrote script error logging system, with a neat Script Error Dialog to go with it.
- `
[ Module Hierarchy
| Class Hierarchy ]
Class Hierarchy
- lib.scripting.Engine:
Provides access to the internals of AutoKey.
- lib.scripting.GtkClipboard:
Read/write access to the X selection and clipboard - GTK version
- lib.scripting.GtkDialog:
Provides a simple interface for the display of some basic dialogs
to collect information from the user.
- lib.scripting.Keyboard:
Provides access to the keyboard for event generation.
- lib.scripting.Mouse:
Provides access to send mouse clicks
- lib.scripting.QtClipboard:
Read/write access to the X selection and clipboard - QT version
- lib.scripting.QtDialog:
Provides a simple interface for the display of some basic dialogs
to collect information from the user.
- lib.scripting.System:
Simplified access to some system commands.
- lib.scripting.Window:
Basic window management using wmctrl
- object:
The most base type
- dict:
dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
d = {}
for k, v in iterable:
d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list.