[X] instead of [Del] for eraser quick access
Apple keyboards have only a "Delete" key (which acts as Backspace), so contortions with Fn key required to access the keysym I was using for eraser quick access. h/t Mark Kim for pointing it out. Because of this use of a printable glyph key, and to solve the issue of on screen keyboard and in-progress text input getting clobbered while accessing eraser, preventing access to the quick eraser when either Text or Label tool are selected.
This commit is contained in:
parent
ef1cf295b8
commit
9be4fa529f
2 changed files with 9 additions and 6 deletions
|
|
@ -60,10 +60,11 @@ http://www.tuxpaint.org/
|
||||||
* Other Improvements:
|
* Other Improvements:
|
||||||
-------------------
|
-------------------
|
||||||
* A keyboard shortcut is now available for quickly accessing
|
* A keyboard shortcut is now available for quickly accessing
|
||||||
a small eraser. Hold the [Del] key while clicking, and drag
|
a small eraser. Hold the [X] key while clicking, and drag
|
||||||
around the picture to erase. (Not available if in the process
|
around the picture to erase. (Not available if in the process
|
||||||
of rotating a stamp or shape.) Release the mouse to return to
|
of rotating a stamp or shape, or when Text or Label tool are
|
||||||
normal operation.
|
active.) Release the mouse to return to normal operation.
|
||||||
|
|
||||||
(Eventually, this could be utilized when we can support
|
(Eventually, this could be utilized when we can support
|
||||||
the recognition of a drawing tablet stylus' "eraser" tip;
|
the recognition of a drawing tablet stylus' "eraser" tip;
|
||||||
see https://sourceforge.net/p/tuxpaint/feature-requests/8/)
|
see https://sourceforge.net/p/tuxpaint/feature-requests/8/)
|
||||||
|
|
|
||||||
|
|
@ -5363,14 +5363,16 @@ static void mainloop(void)
|
||||||
|
|
||||||
SDL_Flip(screen);
|
SDL_Flip(screen);
|
||||||
}
|
}
|
||||||
else if (kbd_state[SDL_SCANCODE_DELETE] /* FIXME */)
|
else if (kbd_state[SDL_SCANCODE_X])
|
||||||
{
|
{
|
||||||
/* Holding [Del] while clicking; switch to temp-mode eraser!
|
/* Holding [X] while clicking; switch to temp-mode eraser!
|
||||||
(as long as we're not involved in anything else within
|
(as long as we're not involved in anything else within
|
||||||
this main loop!) */
|
this main loop!) */
|
||||||
|
|
||||||
if ((cur_tool != TOOL_SHAPES || shape_mode == SHAPE_TOOL_MODE_DONE) &&
|
if ((cur_tool != TOOL_SHAPES || shape_mode == SHAPE_TOOL_MODE_DONE) &&
|
||||||
(cur_tool != TOOL_STAMP || stamp_tool_mode == STAMP_TOOL_MODE_PLACE))
|
(cur_tool != TOOL_STAMP || stamp_tool_mode == STAMP_TOOL_MODE_PLACE) &&
|
||||||
|
cur_tool != TOOL_TEXT &&
|
||||||
|
cur_tool != TOOL_LABEL)
|
||||||
{
|
{
|
||||||
do_quick_eraser();
|
do_quick_eraser();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue