Bug 425370 - Ability to press Delete key alone instead of needing to perform PC-type delete to delete selection contents
Summary: Ability to press Delete key alone instead of needing to perform PC-type delet...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.2.8
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: amyspark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-15 05:56 UTC by WynterTheCat
Modified: 2020-11-04 20:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description WynterTheCat 2020-08-15 05:56:13 UTC
SUMMARY


STEPS TO REPRODUCE
1. Make a selection on an unlocked layer
2. Press the (Mac) Delete key (which is essentially backspace)
3. Does nothing. 
4. Hold FN and press Delete (emulates PC delete)

OBSERVED RESULT
Need to hold FN to perform delete with the Delete key on Mac. Not a usual behavior on macOS.

EXPECTED RESULT
Since Macs lack a dedicated PC delete key, usually Delete (backspace) is used as a delete function. Expect Delete key to delete selection contents.

SOFTWARE/OS VERSIONS
macOS: Catalina (10.15.6 like OS X)
MacBookPro10,1 MacBook Pro Retina (15", Dual Graphics, Early-2013)
Comment 1 Wojtek Trybus 2020-08-15 06:58:04 UTC
There is an easy enough way to get it: go to settings > Configure krita... > Keyboard shortcuts and type "clear" . You can then assign this action to the key you want.

If this should be made a default choice for mac, would probably have to be consulted with other mac users on krita artists forum.
Comment 2 WynterTheCat 2020-08-15 08:03:12 UTC
And I was even changing other shortcuts earlier, and I didn't think of that... One of those days. Though, I do think it should be that by default.
Comment 3 Dmitry Kazakov 2020-08-15 10:00:38 UTC
Hi, Wynter!

The default action for backspace shortcut is "Fill with Background Color". Therefore, when you press Backspace key, it should do that instead of "clearing". And, yes, you can change this behavior in the settings.
Comment 4 Halla Rempt 2020-08-15 10:43:04 UTC
Given that the delete button clears the selection on all other macOS paint apps I've tested, I think we should change the default on macOS.
Comment 5 amyspark 2020-11-04 01:04:43 UTC
boud, should we exchange both in macOS? backspace -> clear, del -> fill with background?
I'm trying to find a place where we can override their defaults.
Comment 6 Halla Rempt 2020-11-04 07:46:29 UTC
I think that it might be easiest to do this when loading the shortcuts.
Comment 7 Bug Janitor Service 2020-11-04 13:03:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/567
Comment 8 amyspark 2020-11-04 20:39:09 UTC
Git commit 99f7f30391c23f20c2d531619971049756416ef4 by L. E. Segovia.
Committed on 04/11/2020 at 12:56.
Pushed by lsegovia into branch 'master'.

Add OS-specific action property retrieval to KisActionRegistry

This enables the retrieval of operating system-specific action
properties.

OS-specific action properties are labeled with the attributes
"operatingSystem" (for the selected OS; currently only "macos" is
defined) and "operatingSystemElse" (for the rest).

This commit adds a function, getChildContentForOS, that:
- When finding a matching "operatingSystem", returns the given node's
text
- When finding a node with "operatingSystemElse", stores the last seen
one
- When finding a node without any of these parameters, stores the first
seen one and ignores the rest

This commit implements said change on the Del and Backspace key
shortcuts for macOS. See krita.action.
CCMAIL: kimageshop@kde.org

M  +4    -2    krita/kritamenu.action
M  +33   -1    libs/widgetutils/kis_action_registry.cpp

https://invent.kde.org/graphics/krita/commit/99f7f30391c23f20c2d531619971049756416ef4
Comment 9 amyspark 2020-11-04 20:42:47 UTC
Git commit 3a9828651dd5942885b80aa508b59e4ea3bb3ab5 by L. E. Segovia.
Committed on 04/11/2020 at 20:42.
Pushed by lsegovia into branch 'krita/4.3'.

Add OS-specific action property retrieval to KisActionRegistry

This enables the retrieval of operating system-specific action
properties.

OS-specific action properties are labeled with the attributes
"operatingSystem" (for the selected OS; currently only "macos" is
defined) and "operatingSystemElse" (for the rest).

This commit adds a function, getChildContentForOS, that:
- When finding a matching "operatingSystem", returns the given node's
text
- When finding a node with "operatingSystemElse", stores the last seen
one
- When finding a node without any of these parameters, stores the first
seen one and ignores the rest

This commit implements said change on the Del and Backspace key
shortcuts for macOS. See krita.action.
CCMAIL: kimageshop@kde.org
(cherry picked from commit 99f7f30391c23f20c2d531619971049756416ef4)

M  +4    -2    krita/kritamenu.action
M  +33   -1    libs/widgetutils/kis_action_registry.cpp

https://invent.kde.org/graphics/krita/commit/3a9828651dd5942885b80aa508b59e4ea3bb3ab5