mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
Shift+Del to delete item in clipboard history
This commit is contained in:
@@ -96,7 +96,13 @@ RippleButton {
|
||||
root.itemExecute()
|
||||
}
|
||||
Keys.onPressed: (event) => {
|
||||
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
|
||||
if (event.key === Qt.Key_Delete && event.modifiers === Qt.ShiftModifier) {
|
||||
const deleteAction = root.entry.actions.find(action => action.name == "Delete");
|
||||
|
||||
if (deleteAction) {
|
||||
deleteAction.execute()
|
||||
}
|
||||
} else if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
|
||||
root.keyboardDown = true
|
||||
root.clicked()
|
||||
event.accepted = true;
|
||||
|
||||
@@ -179,7 +179,7 @@ Item { // Wrapper
|
||||
}
|
||||
|
||||
// Only handle visible printable characters (ignore control chars, arrows, etc.)
|
||||
if (event.text && event.text.length === 1 && event.key !== Qt.Key_Enter && event.key !== Qt.Key_Return && event.text.charCodeAt(0) >= 0x20) // ignore control chars like Backspace, Tab, etc.
|
||||
if (event.text && event.text.length === 1 && event.key !== Qt.Key_Enter && event.key !== Qt.Key_Return && event.key !== Qt.Key_Delete && event.text.charCodeAt(0) >= 0x20) // ignore control chars like Backspace, Tab, etc.
|
||||
{
|
||||
if (!searchInput.activeFocus) {
|
||||
searchInput.forceActiveFocus();
|
||||
|
||||
Reference in New Issue
Block a user