I would like to make a simple macro that does two things:
Ctrl-Delete (the shortcut to delete the next word)
Down Arrow
That's all. Is this possible, the macro recorder doesn't seem to want to record Ctrl+DEL and when I enter Ctrl+DEL when manually building a macro that doesn't work either.
My little two lines replaced by all that code!? The thing is that I want this macro to work regardless of the cursor being inside a word or not.
You don't need to write another large macro, as I appreciate your time, I'll make due. However, ...
* I would like to know why I can't put the "Ctrl-Del" shortcut sequence into a macro?
* Are shortcuts not allowed in Macros?
* Can I somehow modify or add a shortcut?
Well, all the macro code is to replace original behavior of EditDeleteNextWord in any situation as usual in insert mode (column mode turned off) plus the additional cursor down.
IfSel
Delete
EndIf
is for deleting current selection if something is selected as Ctrl+DEL does in this case.
is for deleting just all spaces/tabs up to next non whitespace character or line termination if the caret is positioned on a space or tab character.
And the last block
Find RegExp "[~^t^r^n ]+[ ^t]++"
Replace ""
Key DOWN ARROW
is what you actually want, delete from current position of the caret everything up to beginning of next word or end of line.
With that code blocks you see that even a simple command needs lots of code inside UltraEdit to work in every case. And that was surely not all. Well, the last 2 blocks could be replaced by a simplified version which would have the advantage to be independent of the regular expression engine.
The Command list in the macro editor list all possible commands and selecting one command in this list results in displaying all possible parameters of this command in the Non-numeric parameters list. On help page opened with Help button all the commands with all possible parameters are also listed and additionally explained. As you can see, the command Key supports only a few caret (cursor) moving commands. It is simply by design not possible to run any command from within a macro by simulating pressing its assigned hotkey.
I used to be able to record the Ctrl+Del shortcut in Visual Studio until they dropped the macro recording capability in later versions.
Microsoft Word still allows the control sequence to be recorded. Here is the content of the Word macro for deleting the next word, and then moving the cursor down one line.
I would have thought that since the UE configuration/Key Mapping command EditDeleteNextWord is already defined as Ctrl+Del, the macro editor would understand it.