Is there a modification that will allow the delete key to act as Move to Trash?
Thanks!
Add a rule inside the json file to remap 'Delete' to '⌘ + Delete' while Finder is being focused (using bundle_identifiers and type": "frontmost_application_if). Shouldn't be hard.
I don't can modified and add new Json file in config floder (mean App don't understand which I put into)
Hi @nguyenhuuhanhch !!!
For adding your own Complex Modifications you must put the .json file into the /Users/YourUserName/.config/karabiner/assets/complex_modifications/, then into _Karabiner-Elements/Complex Modifications_ tab, push +Add Rule and then select your rule from the list. It's easy. If your rule doesn't appear (the most frequent thing) is because it has a typo or a syntax error.
Have a great day !!!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The following custom rule that maps Delete to Cmd+Backspace worked for me:
~/.config/karabiner/assets/complex_modifications/_finder_custom.json
{
"title": "Finder Custom",
"rules": [
{
"description": "Use Delete as Move to Trash",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "delete_forward",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "delete_or_backspace",
"modifiers": ["left_command"]
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com.apple.finder"
]
}
]
}
]
}
]
}
Submitted the above solution to Karabiner Elements:
https://github.com/pqrs-org/KE-complex_modifications/pull/320
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This did not work on my end :-( // I have following setup I think it messes up my Ctrl+H combination.
export IGNOREEOF=42
set ignoreeof=42
stty eof undef
stty sane
stty erase "^H"
As an alternative solution I binded Ctrl+k to delete folder/file:
{
"description": "Use Ctrl+k as Move to Trash",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com.apple.finder"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"caps_lock",
"option"
]
}
},
"to": [
{
"key_code": "delete_or_backspace",
"modifiers": [
"fn"
]
}
],
"type": "basic"
}
]
}
Most helpful comment
The following custom rule that maps Delete to Cmd+Backspace worked for me:
~/.config/karabiner/assets/complex_modifications/_finder_custom.json