Implementing CTRL+h as BACKSPACE, and a BBEdit AppleScript Bug

245 views
Skip to first unread message

manyc

unread,
Oct 4, 2011, 3:47:20 PM10/4/11
to BBEdit Talk
For nearly as long as I've been typing (and in nearly every single Mac
OS X application), CTRL+h sends a BACKSPACE. It's a muscle memory I
can't forget, and really don't want to since actually hitting
BACKSPACE means leaving home and a typing slowdown.

I've gone back and forth with BBEdit support and there seems to be no
way to implement this. If you have a workaround, I would love to hear
it.

Now, a possible bug. Currently, I have the following AppleScript in
place:

tell application "BBEdit"
tell application "System Events"
keystroke (ASCII character 8)
end tell
end tell

When clicked with the mouse via the menu it works exactly as expected--
sending a single BACKSPACE. When assigned to a key command such as CTRL
+h, however, it deletes whitespace with a single hit yet will delete
an entire word rather than a single character at a time--very odd. Any
ideas?

Christopher Stone

unread,
Oct 4, 2011, 5:34:09 PM10/4/11
to bbe...@googlegroups.com
On Oct 04, 2011, at 14:47, manyc wrote:
{snip} CTRL+h sends a BACKSPACE. {snip}
Now, a possible bug. Currently, I have the following AppleScript in place:
{snip}
When clicked with the mouse via the menu it works exactly as expected-- sending a single BACKSPACE. When assigned to a key command such as CTRL +h, however, it deletes whitespace with a single hit yet will delete an entire word rather than a single character at a time--very odd. Any ideas?
______________________________________________________________________

What happens when you hit Control-Delete?

Same difference.

If you very quickly release the Control key after hitting the keyboard shortcut it should work as you expect.

If you want to remap the key in a more civilized fashion you'll have to resort to a utility like Keyboard Maestro or Keymando.

--
Best Regards,
Chris

John Delacour

unread,
Oct 4, 2011, 6:19:08 PM10/4/11
to bbe...@googlegroups.com
At 12:47 -0700 4/10/11, manyc wrote:

>When clicked with the mouse via the menu it works exactly as expected--
>sending a single BACKSPACE. When assigned to a key command such as CTRL
>+h, however, it deletes whitespace with a single hit yet will delete
>an entire word rather than a single character at a time--very odd. Any
>ideas?

You have the control key down and you are sending the backspace. The
result is the same as if you typed control+backspace -- or
command+backspace. Catch-22.

JD

David Alexander

unread,
Oct 4, 2011, 8:53:12 PM10/4/11
to bbe...@googlegroups.com
On Tue, 4 Oct 2011 12:47:20 -0700 (PDT), manyc
<fran...@mammothnyc.com> wrote:

>For nearly as long as I've been typing (and in nearly every single Mac
>OS X application), CTRL+h sends a BACKSPACE. It's a muscle memory I
>can't forget, and really don't want to since actually hitting
>BACKSPACE means leaving home and a typing slowdown.
>
>I've gone back and forth with BBEdit support and there seems to be no
>way to implement this. If you have a workaround, I would love to hear
>it.

I just set up a smart keystroke in Butler that sends a backspace when
ctl-h is pressed only in BBEdit. It worked perfectly. I suspect any
keyboard macro program could do the same.

manyc

unread,
Oct 4, 2011, 9:08:32 PM10/4/11
to BBEdit Talk
> What happens when you hit Control-Delete?

Thanks for the info, sorta. As this is not the behavior of any other
Mac OS X application I was unaware that CTRL+delete sent a clear
command.


> If you want to remap the key in a more civilized fashion you'll have to resort to a utility like Keyboard Maestro or Keymando.

I wish I could trust some system-wide macro thing, but I just can't.
Reply all
Reply to author
Forward
0 new messages