Skip to content

Commit

Permalink
Merge pull request #3 from bigman73/bugfix/typo
Browse files Browse the repository at this point in the history
Bugfix/typo
  • Loading branch information
bigman73 authored Nov 26, 2020
2 parents e30a4a3 + c47aec7 commit 38e8805
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Foot Pedal Keyboard
A foot pedal keyboard, using Korg EC5, Arduino and Python
Converts pedal button events into operating system virtual keyboard sequences.

## Sample applications

### Media editing 📸
Control media editing software, such as Adobe Photosop and Premiere, with your foot

### Program code 👨‍💻
Use the foot keyboard pedal to send macros to a code IDE, such as Visual Studio Code

### Practicing musical instruments 🎸
Control playback with your foot, without stopping the practice. The hands stay on the instrument (e.g, Bass guitar) and hitting a foot pedal rewinds the playback to the start.

### Using with Practice#
For example: If Pedal A is clicked (pressed and released) then the python driver will generate a Media Prev keyboard stroke on the operating system. A musician can then control music playback by using his/her feet, a very natural way for musicians that use foot pedals for effects and volume control, when playing instruments such as guitar, bass guitar and keyboards.

Originally, I wanted to be able to able to control [Practice#](https://github.com/bigman73/practicesharp), my open source practice application, with my feet - instead of getting out of practice position and having to use my hands in order control the application
Expand All @@ -21,7 +34,6 @@ But I decided to make a more generic solution. The python driver supoorts dynami
![alt text](https://raw.githubusercontent.com/bigman73/footpedalkeyboard/master/images/breadboard.jpg "The breadboard solution")
![alt text](https://raw.githubusercontent.com/bigman73/footpedalkeyboard/master/images/python-driver-windows.png "The FPK python driver running on Windows")


## More information - In the wiki
Bill Of Materials, wiring schematics and other details:
https://github.com/bigman73/footpedalkeyboard/wiki
Expand Down
4 changes: 4 additions & 0 deletions footpedalkeyboard-driver/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Versions

1.1.1, 2020-11-25
- Fixed typo
- Improved documentation

1.1.0, 2020-10-31
- Added support for process name based active application matching
- Fixed key mappings for Spotify to work on process name
Expand Down
24 changes: 14 additions & 10 deletions footpedalkeyboard-driver/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# Installation steps
# Overview
A foot pedal keyboard, using Korg EC5, Arduino and Python Converts pedal button events (press, release) into operating system virtual keyboard sequences.

# Getting Started
## Installation steps

1. Install miniconda with Python 3.7+
https://conda.io/miniconda.html
> Version 3.7 as of November 2019

2. Create conda environment:
2. Create `conda` environment:
```
conda create --name py37_fpk python=3.7
```

3. Activate conda environment:
3. Activate `conda` environment:
Linux:
```
source activate py37_fpk
Expand All @@ -21,28 +25,28 @@ Windows:
activate py37_fpk
```

4. Upgrade pip:
4. Upgrade `pip`:
```
python -m pip install --upgrade pip
```

5. Install the modules *pyserial* and *pyautogui*:
5. Install the modules `pyserial` and `pyautogui`:
```
pip install pyserial pyautogui
```

6. Install win32gui [windows only]
6. Install `win32gui` [windows only]
1. Download whl: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pywin32

> For Windows 10 64 bit, Python 3.7 use => pywin32-227-cp37-cp37m-win_amd64.whl
2. Install the pywin32 whl:
2. Install the `pywin32` whl:
```
pip install pywin32-227-cp37-cp37m-win_amd64.whl
```
***

# How to run the Foot Pedal Keyboard driver on Windows
## How to run the Foot Pedal Keyboard driver on Windows

1. Change the folder to $(root)\footpedalkeyboard-driver
2. Open command shell (cmd.exe)
Expand All @@ -52,8 +56,8 @@ run.bat

> This can be automated with a Windows task that runs on desktop login
# Configure keyboard mapping
## Configure keyboard mapping
Pedal to Keyboard mapping is done using the **key-mappings.json** configuration file.

*pyautogui* module provides support for keyboard automation (programmatic keyboard actions).
`pyautogui` module provides support for keyboard automation (programmatic keyboard actions).
The different values are documented in the [reference page](https://pyautogui.readthedocs.io/en/latest/keyboard.html#keyboard-keys)
6 changes: 3 additions & 3 deletions footpedalkeyboard-driver/footpedalkeyboard-driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import win32gui
import time

DRIVER_VERSION = "1.1.0"
DRIVER_VERSION = "1.1.1"

# Teensy USB serial microcontroller program id data:
VENDOR_ID = "16C0"
Expand Down Expand Up @@ -173,10 +173,10 @@ def process_footpedalkeyboard_event(event):
break

if matching_application:
apply_ppplication_keys(matching_application, pedal, pedal_action)
apply_application_keys(matching_application, pedal, pedal_action)


def apply_ppplication_keys(matching_application, pedal, pedal_action):
def apply_application_keys(matching_application, pedal, pedal_action):
"""
Applies the matching applications keys to the operating system
"""
Expand Down

0 comments on commit 38e8805

Please sign in to comment.