- all: The keys
Print
andSnapshot
were deprecated becausePrint
had the wrong virtual key associated with it on Windows. UseKey::PrintScr
instead - macOS: The simulated input is no longer effected by the state of the physical keyboard. This default behavior can be changed via the Settings (
independent_of_keyboard_state
) - macOS: Do not coalesce mouse events to allow precise control
- win: Fallback to entering a
Key::Unicode
as unicode if there is no key with that character - macOS: Removed setting and functions related to the delay on macOS because a sleep is no longer necessary
- all:
Key::PrintScr
- all: There finally are some tests in the CI to increase the development speed and prevent regressions
- win, macOS: Allow marking events that were created by enigo. Have a look at the additional field of the
Settings
struct and the new methodget_marker_value
of theEnigo
struct (only available on Windows and macOS) - macOS: Fallback to ASCII-capable keyboard layout for handling non-standard input sources
- macOS: Check if the application has the necessary permissions. If they are missing,
enigo
will ask the user to grant them. You can change this default behavior with theSettings
when constructing anEnigo
struct. - all: Added
Token::Location
andToken::MainDisplay
mostly for debugging purposes. They allow you to check if your expectations are correct
- macOS: No more sleeps!! (Only when the
Enigo
struct is dropped) (#105) - win: Respect the language of the current window to determine which scancodes to send
- win: Send the virtual key and its scan code in the events to work with programs that only look at one of the two
- macOS: Moving the mouse no longer breaks simulating input
- win: Fix being unable to enter text containing multiple newline chars
- macOS: Switched keycodes of
Key::Launchpad
andKey::MissionControl
- macOS:
CapsLock
works (#163) - macOS: Moving the mouse works also if it is the only function (#182)
- linux: libei: Typing is much faster now
- all: Use serde(default) to make the serialized strings less verbose
- all: Serialized tokens can be less verbose because serde aliases were added
- win, macOS: Allow marking events that were created by enigo. Have a look at the additional field of the
Settings
struct and the new methodget_marker_value
of theEnigo
struct (only available on Windows and macOS) - all: The enums
Button
,Direction
,Axis
andCoordinate
implementDefault
- windows: The
move_mouse
function moves the mouse to the correct absolute coordinates again
- All: A new Enigo struct is now always created with some settings
- Rust: MSRV is 1.75
- All held keys are released when Enigo is dropped
- win: Don't panic if it was not possible to move the mouse
- All: Never panic! All functions return Results now
- win: Don't move the mouse to a relative position if it was not possible to get the current position
- All: The feature
with_serde
was renamed toserde
- All: Renamed
Key::Layout(char)
toKey::Unicode(char)
and clarified its docs - All: Split off entering raw keycodes into it's own function
- All: Renamed
key_sequence
function totext
- All: Renamed
enter_key
function tokey
- All: Renamed
send_mouse_button_event
function tobutton
- All: Renamed
send_motion_notify_event
function tomove_mouse
- All: Renamed
mouse_scroll_event
function toscroll
- All: Renamed
mouse_location
function tolocation
- All: Renamed
MouseButton
enum toButton
- DSL: The DSL was removed and replaced with the
Agent
trait. Activate theserde
feature to use it. Have a look at theserde
example to get an idea how to use it
- Linux: Partial support for
libei
was added. Use the experimental featurelibei
to test it. This works on GNOME 46 and above. Entering text often simulates the wrong characters. - Linux: Support X11 without
xdotools
. Use the experimental featurex11rb
to test it - Linux: Partial support for Wayland was added. Use the experimental feature
wayland
to test it. Only the virtual_keyboard and input_method protocol can be used. This is not going to work on GNOME, but should work for example with phosh - Linux: Added
MicMute
key to enterXF86_AudioMicMute
keysym - win: Use DirectInput in addition to the SetCursorPos function in order to support DirectX
- All: You can now chose how long the delay between keypresses should be on each platform and change it during the runtime
- All: You can now use a logger to investigate errors
- *BSD: Fix the build for BSDs
- macOS: Add info how much a mouse was moved relative to the last position
- macOS: A mouse drag with the right key is now possible too
- win, linux:
key_sequence()
andkey_click(Key::Layout())
can properly enter new lines and tabs - linux: You can enter
Key::ScrollLock
now - win: No more sleeps! Simulating input is done in 1 ms instead of 40+ ms. This is most obvious when entering long strings
- macOS: Added keys to control media, brightness, contrast, illumination and more
- macOS: Fix entering text that starts with newline characters
- Linux: Add Media and Volume keys
- Linux: Fixed a Segfault when running in release mode
- Windows: Bumped
windows
dependency to0.48
because0.47
was yanked.
- Windows:
Key::Control
pressesControl
and no longer the leftControl
.
- all: Added a ton of keys (e.g F21-F24 keys and the XBUTTON1 & XBUTTON2 mouse buttons are now available on Windows). Some of them are OS specific. Use conditional compilation (e.g
#[cfg(target_os = "windows")]
) to use them to not break the build on other OSs. - examples: New example
platform_specific.rs
to demonstrate how to use keys/buttons that are platform specific
- macOS: Fixed entering Key::Layout
We should have bumped the minor version with the last release. Sorry about that. Have a look at the changes of 0.0.15 if you come from an earlier version.
- Windows:
mouse_scroll_y
with a positive number scrolls down just like on the other platforms - Windows: replaced
winapi
with the officialwindows
crate - Rust: Using Rust version 2021
- Rust: Minimum supported Rust version (MSRV) is set in Cargo.toml
- Rust: MSRV is 1.64
- macOS, Windows: Moved the functions
main_display_size
andmouse_location
fromEnigo
toMouseControllable
- DSL: Additional ParseError variants to give better feedback what the problem was
- DSL: Additional keys
- All: Added support for F10-F20
- CI/CD: Github Workflows to make sure the code builds and the tests pass
- Traits: Added the functions
main_display_size
andmouse_location
toMouseControllable
- Linux: Implemented the functions
main_display_size
andmouse_location
forMouseControllable
- Windows: panicked at
cannot transmute_copy if U is larger than T
(#121) - Windows: Inconsistent behavior between the
mouse_move_relative
andmouse_move_to
functions (#91) - Windows, macOS: Stop panicking when
mouse_down
ormouse_up
is called with either ofMouseButton::ScrollUp
,MouseButton::ScrollDown
,MouseButton::ScrollLeft
,MouseButton::ScrollRight
and instead scroll - Windows: Always use key codes to be layout independent. Only use scan codes for
Key::Layout
(Fixes #99, #84) - macOS:
key_click
no longer triggers a segmentation fault when called withKey::Layout
argument (Fixes #124) - macOS: Double clicks now work (#82)