Copy link to clipboard
Copied
The UI of my Focus-Points plugin comprises different elements for displaying images and text, as well as buttons and links. To allow operation using keyboard shortcuts, there is a 'hidden' edit field with tiny dimensions that records keyboard input and uses a validate() function to interpret and process shortcut characters.
It is possible to mix mouse and keyboard operation of interactive controls (except for using the TAB key), but when clicking any non-interactive control (e.g. static_text) the edit_field loses focus.
I have tried different ChatGPT suggestions (wrap non-interactive controls in a spacer or attach mouse_down functions that consume clicks) but none of them worked.
Is this a matter of fact and a limitation of the SDK, or does anyone know of a way around it?
Copy link to clipboard
Copied
I don't know of any way you might solve this. The SDK doesn't provide any control over the input focus. Also, all LrView objects are "interactive" in that they support tool tips that appear in response to mouse roll over, and static_text() also supports mouse_down().
Copy link to clipboard
Copied
Attaching mouse_down handlers does indeed work for static_text, but only if you do it for every single instance. So, only the photo and the Ko-fi icon are left as focus 'stealers'. This could be avoided by setting 'enabled' to 'false', but this would grey them out, which obviously makes no sense. It seems that I (or rather, the users) will have to live with the prohibition of clicking on a picture, since doing so breaks shortcut operations. For everything else, a mixed combination of mouse clicks and keyboard shortcuts works perfectly fine.
Too bad that Adobe didn't allow for clickable pictures, otherwise I could have implemented the flagging / rating icons in a way that is optically more close to Lightroom.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more