2
votes

I'm trying to map ctrl+alt+d to delete. Unfortunately, when I press that combination, the system sees ctrl+alt+delete, which naturally brings up the lock screen.

I've tried this to make the ctrl and alt keys look up to the system, but it didn't work:

^!d::Send {Alt Up}{Ctrl Up}{Delete}

I've tried putting ~ and $ in front of the hotkey, but that didn't work either.

I realize I can use KeyWait to wait for the modifier keys to be released:

~^!d::
KeyWait Control
KeyWait Alt
Send {Delete}
return

But then I can't repeatedly press ctrl+alt+delete to quickly delete characters. I have to release the modifier keys between each press, which is awkward.

I realize I can simulate a forward delete with a selection to the right followed by a backspace:

^!d::Send {Shift Down}{Right}{Shift Up}{Backspace}

But that's a bit kludgy, though it does work without releasing the modifiers. It's starting to feel like there isn't a way of accomplishing this, so any help would be appreciated.

1

1 Answers

3
votes

You can try SendPlay as that creates a series of events (messages) that flow directly to the active window rather than performing their native operating system function.

^!d::Sendplay {Delete}

Doc link http://ahkscript.org/docs/commands/Send.htm#SendPlayDetail

Hope it helps