{"id":37598760,"url":"https://github.com/ssbb/zmk-listeners","last_synced_at":"2026-01-23T18:01:36.550Z","repository":{"id":270888573,"uuid":"911760257","full_name":"ssbb/zmk-listeners","owner":"ssbb","description":"ZMK module to invoke behaviors on certain events.","archived":false,"fork":false,"pushed_at":"2025-01-10T08:21:27.000Z","size":14,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T01:41:35.994Z","etag":null,"topics":["zmk","zmk-module"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ssbb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-03T19:29:27.000Z","updated_at":"2025-09-20T08:35:13.000Z","dependencies_parsed_at":"2025-01-10T03:22:28.559Z","dependency_job_id":"d0591710-dd8c-46b1-b408-08fcb7b7042f","html_url":"https://github.com/ssbb/zmk-listeners","commit_stats":null,"previous_names":["ssbb/zmk-layer-listeners","ssbb/zmk-listeners"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ssbb/zmk-listeners","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbb%2Fzmk-listeners","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbb%2Fzmk-listeners/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbb%2Fzmk-listeners/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbb%2Fzmk-listeners/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssbb","download_url":"https://codeload.github.com/ssbb/zmk-listeners/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbb%2Fzmk-listeners/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28697424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["zmk","zmk-module"],"created_at":"2026-01-16T10:00:29.478Z","updated_at":"2026-01-23T18:01:36.543Z","avatar_url":"https://github.com/ssbb.png","language":"C","readme":"# zmk-listeners\n\nZMK module to invoke behaviors on certain events.\n\n## Usage\n\nAdd the following entries to `remotes` and `projects` in `config/west.yml`.\n\n```yaml\nmanifest:\n  remotes:\n    - name: zmkfirmware\n      url-base: https://github.com/zmkfirmware\n    - name: ssbb\n      url-base: https://github.com/ssbb\n  projects:\n    - name: zmk\n      remote: zmkfirmware\n      import: app/west.yml\n    - name: zmk-listeners\n      remote: ssbb\n      revision: v1\n  self:\n    path: config\n```\n\n## Layer Listeners\n\nLayer listeners are specified like this:\n\n```c\n/ {\n    layer_listeners {\n        compatible = \"zmk,layer-listeners\";\n\n        // Call \u0026haptic_feedback_in on layer enter, and \u0026haptic_feedback_out on layer leave\n        nav_num_feedback {\n            layers = \u003cNAV NUM\u003e;\n            bindings = \u003c\u0026haptic_feedback_in \u0026haptic_feedback_out\u003e;\n        };\n\n        // Call \u0026reset_nav on NAV layer leave\n        nav_reset {\n            layers = \u003cNAV\u003e;\n            bindings = \u003c\u0026none \u0026reset_nav\u003e;\n        };\n    };\n}\n```\n\n### Root properties\n\n- `tap-ms`: The time to wait (in milliseconds) between the press and release events of a triggered behavior. Defaults to 5 ms.\n- `wait-ms`: The time to wait (in milliseconds) before triggering the next listener. Defaults to 5 ms.\n\n### Listener Properties\n\nEach listener is defined as a child node.\n\n- `layers` (required): A list of layers to which this listener should apply.\n- `bindings` (required): The first behavior is triggered on layer entry, and the second on layer exit. Use `\u0026none` for the other if you need only one. Second binding (layer leave) can be omitted if not needed.\n\n## Keycode Listeners\n\n```c\n/ {\n    keycode_listeners {\n        compatible = \"zmk,keycode-listeners\";\n\n        // Call \u0026haptic_feedback_key_press on key press, and \u0026haptic_feedback_key_release on key release\n        a_b_feedback {\n            layers = \u003cNAV NUM\u003e;\n            keycodes = \u003cA B\u003e;\n            bindings = \u003c\u0026haptic_feedback_key_press \u0026haptic_feedback_key_release\u003e;\n        };\n    };\n}\n```\n\n### Root properties\n\n- `tap-ms`: The time to wait (in milliseconds) between the press and release events of a triggered behavior. Defaults to 5 ms.\n- `wait-ms`: The time to wait (in milliseconds) before triggering the next listener. Defaults to 5 ms.\n\n### Listener Properties\n\nEach listener is defined as a child node.\n\n- `keycodes` (required): A list of keycodes to which this listener should apply. Implicit modifiers (eg `LG(C)`) are supported.\n- `layers` (optional): A list of layers to which this listener should apply.\n- `bindings` (required): The first behavior is triggered on key press, and the second on key release. Use `\u0026none` for the other if you need only one. Second binding (key release) can be omitted if not needed.\n\n## USB HID LED Listeners\n\n```c\n#include \u003cdt-bindings/zmk/hid_usage.h\u003e\n\n/ {\n    hid_listeners {\n        compatible = \"zmk,hid-listeners\";\n\n        // Call \u0026haptic_feedback_led_on when caps lock led enables, and \u0026haptic_feedback_led_off when caps lock disables\n        caps_feedback {           \n            indicator = \u003cHID_USAGE_LED_CAPS_LOCK\u003e;\n            bindings = \u003c\u0026haptic_feedback_led_on \u0026haptic_feedback_led_off\u003e;\n        };\n    };\n}\n```\n\n### Root properties\n\n- `tap-ms`: The time to wait (in milliseconds) between the press and release events of a triggered behavior. Defaults to 5 ms.\n- `wait-ms`: The time to wait (in milliseconds) before triggering the next listener. Defaults to 5 ms.\n\n### Listener Properties\n\nEach listener is defined as a child node.\n\n- `indicator` (required): A constant from `dt-binding/zmk/hid_usage.h` representing either the NUM LOCK, CAPS LOCK, SCROLL LOCK, KANA, or COMPOSE LED state. These are the only USB HID LED states emitted by the underlying ZMK event.\n- `bindings` (required): The first behavior is triggered on key press, and the second on key release. Use `\u0026none` for the other if you need only one. Second binding (key release) can be omitted if not needed.\n\n## References\n\n- [elpekenin/zmk-userspace](https://github.com/elpekenin/zmk-userspace) - Same thing with a different implementation and API.\n- [badjeff/zmk-output-behavior-listener](https://github.com/badjeff/zmk-output-behavior-listener) - A more generic and complex listener that supports layers, keycodes, mouse events, etc.\n","funding_links":[],"categories":["Behaviors","Community firmware Modules and Behaviors"],"sub_categories":["Custom Behaviors"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssbb%2Fzmk-listeners","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssbb%2Fzmk-listeners","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssbb%2Fzmk-listeners/lists"}