You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a kid using the winxp mspaint, I developed a muscle memory for resizing the canvas by pressing a series of key presses. For instance, to resize to 16x16:
Ctrl+E, 1, 6, Tab, 1, 6, Enter
The relies on the fact that, when the Attributes window is opened:
the "Width" field is focused
its contents are selected
pressing "Tab" will move to the "Height" field, and
pressing "Enter" while either the "Width" or "Height" window is focused will behave as if the "OK" button was pressed.
Would it be possible to replicate this behavior in jspaint? Currently, upon opening the Attributes window, its "OK" button is focused, and pressing "Tab" moves focus to the "Cancel" button.
The text was updated successfully, but these errors were encountered:
I moved the default focus and made it select the width field's content, so this workflow is working now.
Note to self: pressing Enter only works because the OK button is the first button in the form, and buttons in forms implicitly are considered "submit" buttons. I could clarify things in the code by marking buttons with type="submit" and type="button" respectively.
Also, the submit button should have a special style to it, which I support in my OS GUI library with class="default", but this style should move to the focused button, always indicating which button will be activated if you press Enter.
I made the default focus for the various other dialogs match MS Paint,
applied submit button / focused button styles to all the dialogs, and
added keyboard shortcuts to more dialogs, including the image attributes dialog. You can now jump to specific fields, for example Alt+H to go to Height. The letters for the shortcut are underlined.
As a kid using the winxp mspaint, I developed a muscle memory for resizing the canvas by pressing a series of key presses. For instance, to resize to 16x16:
Ctrl+E, 1, 6, Tab, 1, 6, Enter
The relies on the fact that, when the Attributes window is opened:
Would it be possible to replicate this behavior in jspaint? Currently, upon opening the Attributes window, its "OK" button is focused, and pressing "Tab" moves focus to the "Cancel" button.
The text was updated successfully, but these errors were encountered: