# Docs on XPCE keybinding events?

**URL:** <https://swi-prolog.discourse.group/t/docs-on-xpce-keybinding-events/8847>\
**Category:** Data Structure\
**Created:** [March 3, 2025, 9:27pm UTC](https://swi-prolog.discourse.group/t/docs-on-xpce-keybinding-events/8847 "2025-03-03T21:27:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![l4e21](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/l4e21/32/7581_2.png) [@l4e21](https://swi-prolog.discourse.group/u/l4e21)\
**Post date:** [March 3, 2025, 9:27pm UTC](https://swi-prolog.discourse.group/t/docs-on-xpce-keybinding-events/8847/1 "2025-03-03T21:27:38Z")

</div>

I’ve scoured the XPCE user guide and multiple other sources for information on this but I can’t find really any information on handling keyboard events, keyboard bindings. I know I’m supposed to add a recogniser somewhere but it’s really not clear how to do it and there aren’t enough examples in the user guide. I’d love to help enrich some of these examples. I really dislike using a mouse. Please help!

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [March 4, 2025, 8:33am UTC](https://swi-prolog.discourse.group/t/docs-on-xpce-keybinding-events/8847/2 "2025-03-04T08:33:03Z")

</div>

xpce is in a bit of a zombie state … It is minimally maintained and used for the Prolog development tools, but that is about it. Docs are very old and the doc sources require quite a bit of work to even compile. For keys, there are two levels: class `recogniser` that processes individual events and class `key_binding` that provides Emacs-inspired parsing of multi-key events. Use `?- manpce.` for the manual. Use the class browser and search the code in xpce/prolog/lib for examples.

---

<div class="post-metadata">

**Author:** ![l4e21](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/l4e21/32/7581_2.png) [@l4e21](https://swi-prolog.discourse.group/u/l4e21)\
**Post date:** [March 4, 2025, 12:11pm UTC](https://swi-prolog.discourse.group/t/docs-on-xpce-keybinding-events/8847/3 "2025-03-04T12:11:48Z")

</div>

Thank you very much! I didn’t think to check `manpce` which in hindsight is the best source of info. I’ll remember that going forward. I’ll give it a shot later and see if I can find a solution to keybindings using that.
