Giter VIP home page Giter VIP logo

pykeys's Introduction

pykeys

Python Module (C-extension based) for injecting Keyboard events. This is purposely a C-extension based plugin so that it can be easily included in FL Studio Midi Scripts.

Goals of this Project

To create self-contained libraries that can be included in FL Studio (Mac and Windows) midi scripts (and possibly distributed with FL Studio if Image-Line chooses) to enable properly injecting keyboard events.

How to Use

Copy the pyd files in the dist/ folder (or you can pick and choose the pyd files in the lib.* folders) into your midiscript folder.

To use, your could would do the following:

import pykeys


# Assign the modifier key 0 for not pressed, and 1 if pressed.
shift = 0
cmd_win = 0    # Win key on windows and Command key on Macs
ctrl = 0       # Ctrl key on both win/mac
opt_alt = 0    # Alt key on windows and Option key on Macs

retValue = pykeys.send('f6', shift, cmd_win, ctrl, opt_alt)
# Returns true if successfully sent.

Building

The command to build is:

python setup.py build_ext -f

To specify a specific platform, use --plat-name.

Windows Notes

If PyBridge define files are updated, you can update the library with the following commands:

lib /def:PyBridge.def /out:PyBridge.lib /machine:x86
lib /def:PyBridge_x64.def /out:PyBridge_x64.lib /machine:x64

See reference

  • FL's PyBridge is missing the symbol PyModule_Create. Need to use PyModule_Create2 instead

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.