Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Key, Text and Paste action support for X11 and Mac OS using pynput #72

Merged
merged 8 commits into from
Apr 23, 2019

Commits on Apr 14, 2019

  1. Add Key and Text action support for X11 and Mac OS using pynput

    Dragonfly's typeable and keyboard related files have been heavily
    modified to do this:
    
    - The *dragonfly/actions/keyboard.py* file is now a sub package
      instead.
    - The Windows Keyboard class has been moved to a new file:
      *dragonfly/actions/keyboard/_win32.py*.
    - KeySymbols classes for supported platforms have been defined that
      map common key names to platform-specific key symbols, e.g.
      "LSUPER" -> "win32con.VK_LWIN".
    - "from dragonfly import Keyboard, Typeable" (or equivalent) will
      now import classes for the current platform.
    drmfinlay committed Apr 14, 2019
    Configuration menu
    Copy the full SHA
    bd92a72 View commit details
    Browse the repository at this point in the history
  2. Fix small problem with the Key action

    Python 2.7 raises errors in 'except' blocks as expected,
    but Python 3 doesn't. This commit changes Key to check if the
    typeable exists using 'get()' instead of catching a KeyError.
    drmfinlay committed Apr 14, 2019
    Configuration menu
    Copy the full SHA
    0b21fb5 View commit details
    Browse the repository at this point in the history
  3. Unmock the Paste action and allow it to work with other platforms

    This is possible now that the Key and Text actions are working.
    The system clipboard is used through the pyperclip Clipboard class
    on Mac OS and X11.
    
    This commit also fixes a bug where None can be passed to
    pyperclip.copy() and raise an error.
    drmfinlay committed Apr 14, 2019
    Configuration menu
    Copy the full SHA
    05cb280 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5e68e8f View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2019

  1. Add script for testing the Key and Text actions on X11 using xev

    The "xev" program is used to capture key presses, so it must be
    installed. This script is not a unit test file.
    drmfinlay committed Apr 17, 2019
    Configuration menu
    Copy the full SHA
    22e173e View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2019

  1. Fix a few problems with the X11 action test script

    - Press a few more keys twice: F11, Super_L and Super_R.
    - Decode lines from 'xev' before using them.
    - Remove the "npsep" key because it sometimes doesn't work.
    drmfinlay committed Apr 19, 2019
    Configuration menu
    Copy the full SHA
    8c6df0c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    db2c307 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2019

  1. Fix two issues with dragonfly's mocked actions

    - Make each mocked action refer to a class instead.
    - Replace mock_dyn_str_action with a mocked Mouse class, as that
      action is the only DynStrActionBase sub-class left that isn't
      implemented for other platforms.
    drmfinlay committed Apr 22, 2019
    Configuration menu
    Copy the full SHA
    0fadf16 View commit details
    Browse the repository at this point in the history