
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
kmHook
kmHook
only works on Windows, is pure Python using only ctypes
, time
and no other dependencies.
kmHook
currently, only french AZERTY keyboards are supported.
kmHook
allows you to detect, synthesize keyboard & mouse events.
kmHook
also implements various related functions, see below.
import kmhook as km
while not km.is_pressed('pause'):
km.sleep(0.001) # recommended so that you don't consume CPU
if km.is_pressed_once('space'):
km.continuous_relative_move(600, 400, 500) # moves mouse smoothly during 500ms
get_valid_key_names() -> tuple
Returns all the valid key names to use within kmHook
is_pressed(key: str | tuple[str] | list[str]) -> bool
Checks if a key or a sequence of keys is being pressed.
is_pressed_once(key: str | tuple[str] | list[str]) -> bool
Checks if a key or a sequence of keys is being pressed but only once : if the key was being pressed during the last call and is still being pressed, this function returns False... until key is released and pressed again.
press(key: str | list | tuple) -> None
Presses the key (a single str or a sequence of keys) but does not release it
press_and_release(key: str | list | tuple) -> None
Presses and releases the key or the sequence of keys.
release(key: str | list | tuple) -> None
Releases the key (a single str or a sequence of keys).
get_key_name() -> str
Waits for a key to be pressed and return its name.
get_mouse_pos() -> tuple[int, int]
Returns current mouseposition.
move_mouse_absolute(x: float | int, y: float | int) -> None
Moves mouse absolutely to coordinates (x,y).
move_mouse_relative(x: float | int, y: float | int) -> None
Moves mouse relatively to current position.
continuous_relative_move(x: float | int, y: float | int, time_interval: float | int) -> None
Moves mouse relatively, smoothly and continuously during time_interval. Is blocking.
FAQs
Fiddle with mouse and french keyboard under Windows
We found that kmhook demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.