Skip to content

A python library that listens to key types on a terminal and handles given key combinations

Notifications You must be signed in to change notification settings

sangmank/py-showkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

py-showkey

A python library that listens to key types on a terminal and handles key combinations. This is an addition of key combination handling feature on top of what showkey does in kbd package.

Useful for handling HID devices that generate key types.

In most case, sudo would be necessary.

usage (code snippet from showkey.py):

from showkey import ShowKey

sk = ShowKey()
sk.addKeyAction("*p", key_pressed)  # adds handler for all key press
sk.addKeyAction("*r", key_released) # adds handler for all key release
sk.addKeyAction([16, 56], alt_q)    # adds handler for Alt-Q comb.
sk.run()

Reference

About

A python library that listens to key types on a terminal and handles given key combinations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages