Global Key Interceptor [message #1852412] |
Sat, 14 May 2022 17:20  |
Eclipse User |
|
|
|
Most developers make extensive use of keyboard shortcuts, and the ongoing activities may sometimes be hard to follow for others during a pair programming session or presentation (as viewers typically won't be able to see which keys are being typed). Learning about new keyboard shortcuts is an important aspect of pair programming (and watching coding presentations), and I would like to facilitate this experience for the folks who are not in the driver's seat and just watching the screen.
I've been thinking about an Eclipse plugin that, in a separate view, logs all keyboard strokes that trigger commands/actions. For example, when I press Ctrl+Shift+O, an entry should appear that says something like "Ctrl+Shift+O - Organize Imports", or when I press Ctrl+1 it should show "Ctrl+1 - Quick Fix". Ideally, this should work in any view, not just in a particular editor or view. That is, for example, during a debug session, this new view would log things like "F5 - Step Into" and "F8 - Resume" to make it easier for an onlooker to follow the activities on the screen.
I've looked at Eclipse's Command and Action framework, but that seems to be more for registering new actions with particular views and editors. I'm looking for a global "hook" (so to speak) that allows me to intercept any and all special key presses and gives me access to the current command context so I can look up and log the corresponding action names.
Can someone give me some pointers to how I would go about for such a plugin? Is there some sort of global key interceptor API?
|
|
|
|
Re: Global Key Interceptor [message #1852451 is a reply to message #1852427] |
Mon, 16 May 2022 16:12  |
Eclipse User |
|
|
|
Thanks, Rolf. I'm aware of this feature but I wanted to create something more persistent. The overlays are easy to miss if there is a lot of other stuff going on in the workbench. I will have a look at the IExecutionListener API, it seems to be exactly what I need.
|
|
|
Powered by
FUDForum. Page generated in 0.03599 seconds