# Can a plug listen for keyboard shortcuts?

**URL:** https://community.silverbullet.md/t/can-a-plug-listen-for-keyboard-shortcuts/984
**Category:** Plug Development
**Created:** [September 12, 2024, 3:29am UTC](https://community.silverbullet.md/t/can-a-plug-listen-for-keyboard-shortcuts/984 "2024-09-12T03:29:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![abr198725](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@abr198725](https://community.silverbullet.md/u/abr198725)
#### Post date: [September 12, 2024, 3:29am UTC](https://community.silverbullet.md/t/can-a-plug-listen-for-keyboard-shortcuts/984/1 "2024-09-12T03:29:07Z")

</div>

Can a plug listen for several keyboard shortcuts and do its own actions in response? I didn’t see any relevant APIs in the silverbullet syscalls directory.

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [September 12, 2024, 11:45am UTC](https://community.silverbullet.md/t/can-a-plug-listen-for-keyboard-shortcuts/984/2 "2024-09-12T11:45:20Z")

</div>

Not directly. Plugs can define commands, and commands can define keybindings, but you cannot listen to random key events.

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [November 22, 2024, 5:40pm UTC](https://community.silverbullet.md/t/can-a-plug-listen-for-keyboard-shortcuts/984/3 "2024-11-22T17:40:11Z")

</div>

And this plug may also provide inspiration: [New Plug: Outline Sidebar](https://community.silverbullet.md/t/new-plug-outline-sidebar/1288)

Perhaps these efforts can even be merged.
