Making sort by Length or Find Length Duplicates key-bindable

Discussion related to "Everything" 1.5 Alpha.
Post Reply
mvdeckard
Posts: 29
Joined: Tue Oct 25, 2022 11:46 pm

Making sort by Length or Find Length Duplicates key-bindable

Post by mvdeckard »

Hi, I frequently sort by the Length property for quick dupe-checking. However I can't find a way to bind a keyboard shortcut to it. I see a "Sort By | Other..." option, however it's not persistent and will prompt for a new property every time. I don't want to duplicate 20+ bookmarks with a separate "dupe:length sort:length" version each with a unique additional keybind.

Ideal would be ability to bind a keyboard shortcut to the view you get by right-clicking the Length column -> Find Length Duplicates (dupe:length sort:length). However the only key-bindable View|Find Duplicates options seem hardcoded and limited to Name and Size as seen below. Any possibility that keybindable, custom "Find <column> Duplicates" views be added in the future? Or is there some magic advanced or .INI parameter that could add this? Thanks

...Or the ability to keybind a custom string that is added to the current view invisibly (doesn't appear in the edit box), i.e.

custom_edit_string="dupe:sort length:sort" <key-bind>, bound to ALT+L in my case.

I'm currently reading Localization String IDs trying to see if there's a solution in there but the syntax is a little confusing. I've also read through Command IDs but can't find anything that would apply either.

Clipboard01.png
Clipboard01.png (26.68 KiB) Viewed 1847 times
mvdeckard
Posts: 29
Joined: Tue Oct 25, 2022 11:46 pm

Re: Making sort by Length or Find Length Duplicates key-bindable

Post by mvdeckard »

After an hour of digging around and eventually discovering the debug console, I found that adding /command 53003 to a BOOKMARK will accomplish this. A bit tedious, but worth it since learning how to monitor debug for numeric commands issued opens up being able to map a key to practically anything. Killer feature, wish I'd discovered it sooner! :)
Last edited by mvdeckard on Mon Sep 02, 2024 8:48 pm, edited 8 times in total.
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: Making sort by Length or Find Length Duplicates key-bindable

Post by void »

Another bookmark search:
/add-search dupe:length



/add-search
Command IDs
mvdeckard
Posts: 29
Joined: Tue Oct 25, 2022 11:46 pm

Re: Making sort by Length or Find Length Duplicates key-bindable

Post by mvdeckard »

^
Thanks for this. Is there a variation does doesn't add the string to the search box, i.e. /add_search_silent ? Because that's what /command 53003 does which I prefer.
Last edited by mvdeckard on Mon Sep 02, 2024 2:48 am, edited 1 time in total.
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: Making sort by Length or Find Length Duplicates key-bindable

Post by void »

No, I will add a /dupe length search command to make this easier..
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Making sort by Length or Find Length Duplicates key-bindable

Post by tuska »

mvdeckard wrote: Mon Sep 02, 2024 2:00 am ... I found that adding /command 53003 to a BOOKMARK will accomplish this. ...
Command: 53003 does not exist.

Maybe
Command ID:   UI_ID_VIEW_SORT_BY_ASCENDING   40037
:?:
Last edited by tuska on Mon Sep 02, 2024 12:02 pm, edited 1 time in total.
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: Making sort by Length or Find Length Duplicates key-bindable

Post by void »

53003 isn't documented yet.
I'll update this soon.

Code: Select all

#define UI_ID_RESULT_LIST_FIND_COLUMN_DUPLICATES_BY_POS_START	53000 // Everything 1.5
#define UI_ID_RESULT_LIST_FIND_COLUMN_DUPLICATES_BY_POS_END		54000 // exclusive
If you move your columns, /command 53003 won't work anymore..
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Making sort by Length or Find Length Duplicates key-bindable

Post by tuska »

2void
Thank you for the clarification.
mvdeckard
Posts: 29
Joined: Tue Oct 25, 2022 11:46 pm

Re: Making sort by Length or Find Length Duplicates key-bindable

Post by mvdeckard »

Here are the new Bookmarks I defined. Technically all but Find Length Duplicates can already be keybound in Keyboard, but I wanted them all in one place for easier management, rather than flipping back and forth between Bookmarks and Keyboard trying to remember what is defined where.

@void I wonder if adding a custom keybinds to function to Options-General-Keyboard might not be worth exploring since using Bookmarks for this feels a bit hacky longterm.

Clipboard01.png
Clipboard01.png (3.14 KiB) Viewed 1656 times
therube
Posts: 4953
Joined: Thu Sep 03, 2009 6:48 pm

Re: Making sort by Length or Find Length Duplicates key-bindable

Post by therube »

Does Everything know the "click focus column" - of a line, in its Result List?
And in this respect, "focus", means that you set focus at a particular line column (by left-click at a particular line/column), notwithstanding that pointer focus may have since changed, but "click focus" was "set".

Such that if you "focused" on the Size column of a particular line, it would know you focused on the Size column.
Or if you "focused" on the Length column of particular line, it would know you focused on the Length column.

If so, you might then be able to automate a hotkey action to Find ___ Duplicates (on 'click focus column'), just as you can do now, "manually", by focusing on a particular column (header) & Find ___ Duplicates (from the right-click context menu [while hovering the column header itself]).
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: Making sort by Length or Find Length Duplicates key-bindable

Post by void »

Everything does track the focused cell.
You can click on a cell, then use left/right to focus the next/prev cell.

Unfortunately, there's no commands to find dupes on the focused cell or hot cell.

I will consider column commands for the focused cell and hot cell.
Thank you for the suggestion.
mvdeckard
Posts: 29
Joined: Tue Oct 25, 2022 11:46 pm

Re: Making sort by Length or Find Length Duplicates key-bindable

Post by mvdeckard »

Yeah I realized shortly after my last post about the bookmark I created for /command 53003 to Find Length Duplicates, that it breaks as soon as column layout is different - a different column is then duplicate-sorted. So for now it works as long as I keep my columns positions static.
Post Reply