Remap Pipe character (SHIFT-Balckslash) with ASCII code 174

Background ASCI, 124, 179 and all that
What I know as the Pipe character, on my keyboard is generated from shift backslash.
This I think is ASCI code 124 and is shown here:

|

this Pipe character is an illegal character in filenames (At least in windows)
A different character corresponding to the extended ASCI code 179 is very similar and is legal tender in windows filenames.
You can produce it from a windows machine with the following keystrokes

Alt Key down
179
Alt key up

Here is what it looks like:

This is a screenshot from https://www.asciitable.com/ :
image

What I do now
Frequently I will hit the above mentioned keys to generate the ASCI code 179 character when naming/renaming files

What I want to do
When in Opus, and only in Opus, I want to rewrite this character
Pipe char == | == SHIFT-Backslash on my keyboard
To the afore mentioned
ASCI 174 == │

Solution 1 (Less Preferred)
AHK which I use already
I have had a go before with this but come unstuck.
Cant remember why.
Before I try again I wonder if there is a ......

Solution 2 (More Preferred)
Setup a keystroke driven solution here:

Any comments greatly appreciated as always.....

You can use @sendkey to send a key press.

This will only work while inline renaming and you can set a custom key shortcut.

Preferences / File Operations / Renaming Files / Control Keys

selstart = Len(valleft) + 1;
selend = selstart;
return valleft + Chr(124) + valright;

Ah! Ideas!
I will cogitate and try them... thanks!

I accidently put the wrong code in there... changing to 179 doesn't put in the 'Box drawing character single vertical line' Chr(65372) works though but not the exact same character.

1 Like

This one! Chr(9474)

Inline Rename Update01
With thanks to @Yonder this works exactly as intended
(Although I do not understand the logic at this point.
Soem work for me to do):

Inline Rename Followup02
I am suspecting I will never get around this. (Any ideas?):

I want a solution that will work Opus wide as I have renaming scripts that use popup dialogs.
Will update any findings I make.
Cheers!

Replacing the | key process-wide seems like a bad idea. There are times when you need to type a | character.

Changing it for just Inline Rename might make sense, but wouldn't affect other places.

Personally, I would put it on a (different) hotkey so it can be process-wide (or even system-wide) and so that the | character can still be typed when needed.

1 Like

The inline shortcuts can already be used in various places within DOpus where a name of a file/folder is being changed, searched or filtered for.

  • Inline rename
  • Advanced/Simple rename edit fields
  • Filter bar edit field
  • Find panel Name edit field
  • Possibly other places I'm unaware of

@Jon @Leo (feature request)
Perhaps there should be an option implemented into DOpus to allow dialogs to take advantage of these inline rename keys as well, specifially when the dialog is used for file/folder names. An option to enable inline rename shortcuts for the following dialogs.

  • Script Dialog
  • {dlgstring}
  • etc

This would also solve slouw's problem.

1 Like

Wonderful dialog!
Thank you guys.