{"id":26022399,"url":"https://github.com/keke1008/hookmap","last_synced_at":"2025-03-06T09:55:11.659Z","repository":{"id":49776731,"uuid":"380757249","full_name":"keke1008/hookmap","owner":"keke1008","description":"Registers hotkeys and simulates keyboard and mouse input.","archived":false,"fork":false,"pushed_at":"2023-05-07T13:30:01.000Z","size":637,"stargazers_count":16,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T02:09:14.662Z","etag":null,"topics":["rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keke1008.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-27T14:13:33.000Z","updated_at":"2024-11-15T19:19:53.000Z","dependencies_parsed_at":"2023-01-28T17:02:01.504Z","dependency_job_id":null,"html_url":"https://github.com/keke1008/hookmap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keke1008%2Fhookmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keke1008%2Fhookmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keke1008%2Fhookmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keke1008%2Fhookmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keke1008","download_url":"https://codeload.github.com/keke1008/hookmap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242187663,"owners_count":20086218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust"],"created_at":"2025-03-06T09:55:09.622Z","updated_at":"2025-03-06T09:55:11.638Z","avatar_url":"https://github.com/keke1008.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# hookmap\n\n[![Crates.io](https://img.shields.io/crates/v/hookmap.svg)](https://crates.io/crates/hookmap)\n[![API reference](https://docs.rs/hookmap/badge.svg)](https://docs.rs/hookmap)\n\nA rust library for Register hotkeys and emulate keyboard and mouse input.\n\n## Supported OS\n\n* Windows 10\n\n## Example\n\n```rust\nuse hookmap::prelude::*;\n\nfn main() {\n    let mut hotkey = Hotkey::new();\n\n    // Remap H,J,K,L keys as in vim.\n    hotkey\n        .register(Context::default())\n        .remap(Button::H, Button::LeftArrow)\n        .remap(Button::J, Button::DownArrow)\n        .remap(Button::K, Button::UpArrow)\n        .remap(Button::L, Button::RightArrow);\n\n    // You can define hotkeys that work only when specific keys are pressed or released.\n    hotkey\n        .register(\n            Context::new()\n                .modifiers(buttons!(LCtrl, !RShift))\n                .native_event_operation(NativeEventOperation::Block),\n        )\n        .on_press(Button::Space, |_| {\n            seq!(with(LCtrl), A).send_ignore_modifiers();\n        })\n        .disable(buttons!(A, B))\n        .on_release(buttons!(A, B), |event: ButtonEvent| {\n            seq!(with(LShift), [event.target]).send_ignore_modifiers();\n        });\n\n    hotkey.install();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeke1008%2Fhookmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeke1008%2Fhookmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeke1008%2Fhookmap/lists"}