molsonkiko / JsonToolsNppPlugin

A Notepad++ plugin providing tools for JSON like linting, querying, a tree view, and CSV conversion.
Apache License 2.0
70 stars 9 forks source link

Feature Request - Tab key navigation of panel #10

Closed vinsworldcom closed 1 year ago

vinsworldcom commented 1 year ago

Currently, when the panel is displayed, it seems nothing has focus. When I launch the panel, typing does nothing anywhere. I would expect perhaps focus could be set on the query text box so typing would immediately enter a query rather than having to mouse click on the query text box to start typing.

If I'm in the query text box, Tab enters an actual tab character. Are tabs required / supported in Remes Query Language? If spaces can be used instead, suggest that Tab key is used to switch to the next UI element (tabstops) as is typically the case in GUI applications.

1) Query text box 2) Submit query button 3) Query to CS button 4) Save Query res button 5) View all subtrees checkbox 6) tree view 7) Current Path button 8) current path text box 9) ... back to beginning (query text box)

Cheers.

molsonkiko commented 1 year ago

Hi Vince, I agree that all the issues you described are frustrating. Unfortunately, there doesn't seem to be a good way to implement any of those proposals.

I have tab stops on all of the controls, I explicitly set the AcceptsTab parameter of the query box to false, which is supposed to make it so that Tab navigates to the next control in the tab order, and I tried adding a line that activates the query box when the tree viewer is initialized. Nothing works.

FWIW, I looked at CSVLint and CSV Query, two other C# plugins that have dockable controls, and they have the same issue you just articulated where you can use tabs for all the undocked forms (e.g., the settings form) but you can't use tabs for any of the docked forms (e.g., query box for CSV Query). It's probably just an issue with how Windows Forms integrates with Notepad++.

I'm not going to close this issue, because it may be worth revisiting in the future, but I don't think it's solvable without some pretty involved work on the underlying infrastructure.

vinsworldcom commented 1 year ago

Seems to work now, although there is a system 'bell' when tabbing from tree view to the "Current Path" button.