Tk Source Code

View Ticket
Login
Ticket UUID: 3607787
Title: Expand [event info] to show which event(s) have a keysym
Type: RFE Version: None
Submitter: talvo Created on: 2013-03-12 15:42:29
Subsystem: 69. Events Assigned To: hobbs
Priority: 7 High Severity:
Status: Open Last Modified: 2026-09-19 11:09:13
Resolution: None Closed By:
    Closed on:
Description:
Right now, there's no way to tell (short of looping over all event names) which events are bound to a keysym. To get "Select All" behaviour for Control-a, I have

  event add <<SelectAll>> <Control-a> <Control-A>

in my app. What I didn't realise (as I develop on Windows) is that, on Linux, these keysyms are already added to <<LineStart>>. When someone reported that Control-a wasn't doing 'Select All', we had to guess and poke around to find what was happening. It would be helpful if

event info <Control-a>

which is currently invalid and returns an error would, instead, return a list of all events which have the keysym added.
User Comments: serhiy.storchaka added on 2026-09-19 11:09:13:

Implemented in [ec5eb71335] (branch event-info-sequence): event info <Control-a> returns the virtual events the sequence is added to, e.g. <<LineStart>> on X11. Needs a TIP.


dkf added on 2013-03-13 16:57:48:
If we have that information, it would absolutely be good to introspect it. (It would also be the sort of thing that fits with general API testability principles.)