Override illegal typed symbols when editing file names

I've solved the issue of pasting : etc. with a custom function by overriding Ctrl+V Hook paste when editing file names to substitute illegal symbols

However, typing : still fails and I have to retype every time with an alternative typing method.

Is it possible to have a custom function that would be activated when some specific symbols are typed in path / file (re)name fields similarly to Ctrl+V paste?

Alternatively, if I could detect when a path-like field is active, I could override : in AHK, but I'd need a way to have a reliable way to fire some script command that can send an OS window message to another app on each activation/deactivation of a path typing field. Is that possible?

The best way, of course, would be for DOpus to make replacement chars customizable and use them instead of typing nothing

We'll make it possible to customize replacement characters in the next beta.

4 Likes

Cool feature, thanks, now a simple : won't break your typing flow!

But these chars are broken \⧵ /⁄, slashes show a warning and don't replace, but then every 2nd character is replaced correctly

also doesn't work, I've read somewhere that it was illegal on old FAT (so would be nice to exlude everywhere just in case even if NTFS is ok), but checked again now and it seems to have been incorrect info

Replacement chars consisting of surrogate pairs will work in the next beta.
Slashes are allowed because you can use them to rename into sub-folders.
Only illegal filename chars will be replaced and as you've noted, ^ isn't illegal in filenames.

Is it possible to add a config to limit the slashes-as-sub-folders to only \?

While it's an interesting feature, I'm mostly been bitten by its accidental triggering, so would at least prefer regualar / division slashes that are very commonly used in non-path-related text to be used as is (and auto-replaced), and only leave the only-path-related \ as a trigger for nested subfolders

Both / and \ are valid path separators in Windows.

But they're not valid name symbols. You just override that "illegality" for another feature for the input field, thus breaking the new "illegal" replacement one

And for the name input field I don't need both symbols for a sub-dir-creation feature I never use. While typing "/", on the other hand, is way more useful in naming things.

But maybe there is some config to disable the sub-dir creation feature altogether? I could also use this less granular approach and then should I ever need it will just enable it instead with some button