src/interceptor/mod.rs
--> Collects and print out the raw input events.
You must know your keyboard's path:
- In
main()
, calldevices::input::print_paths()
, it will show you a list of paths for your input devices. cargo run
, identify and copy your keyboard's path, it usually ends with/input0
.- Goto
src/utils/mod.rs
and modify the HashMap inmock_device_alias()
function with your keyboard path.
๐ฅ Danger incoming! Read before proceed:
-
interceptor::start()
will completely disable your keyboard, you'd need to pressTab
in order to quit the program. The function responsible for quitting the program isdev_clear()
, can be found insrc/utils/dev_print.rs
. -
Go back to
main()
, uncommentinterceptor::start()
, you cancargo run
, press some keys and see things happen.