Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

p9p backspace/delete in osx

102 views
Skip to first unread message

Christopher Hobbs

unread,
Sep 25, 2012, 4:52:40 AM9/25/12
to
Being that macs don't have a proper delete key, how can I get delete
behavior to kill a program in rc short of slapping a real keyboard
on this machine?

erik quanstrom

unread,
Sep 25, 2012, 5:06:54 AM9/25/12
to
i think it's function or apple +backspace. (doesn't work through a kvm.)

- erik

erik quanstrom

unread,
Sep 25, 2012, 5:26:06 AM9/25/12
to
> > i think it's function or apple +backspace. (doesn't work through a kvm.)
>
> fn+delete works on both local and remote (X11 based) p9p acme and 9vx.

obviously not necessary when using a full-size keyboard, and there is a
real delete on those keyboards.

- erik

Bakul Shah

unread,
Sep 25, 2012, 5:22:26 AM9/25/12
to

andrey mirtchovski

unread,
Sep 25, 2012, 5:39:14 AM9/25/12
to
> obviously not necessary when using a full-size keyboard, and there is a
> real delete on those keyboards.

none of these works with an rc shell. all i see is:

^[[3~

printed with each method. repeatedly as i bash the keyboard with my stubby fingers :)

erik quanstrom

unread,
Sep 25, 2012, 5:42:48 AM9/25/12
to
On Tue Sep 25 05:40:05 EDT 2012, mirtc...@gmail.com wrote:

> > obviously not necessary when using a full-size keyboard, and there is a
> > real delete on those keyboards.
>
> none of these works with an rc shell. all i see is:
>
> ^[[3~
>
> printed with each method. repeatedly as i bash the keyboard with my stubby
> fingers :)

works with my old copy of p9p in 9term. when did p9p go broken?

- erik

Bakul Shah

unread,
Sep 25, 2012, 5:47:52 AM9/25/12
to
On Tue, 25 Sep 2012 03:39:14 MDT andrey mirtchovski <mirtc...@gmail.com> wrote:
>
> > obviously not necessary when using a full-size keyboard, and there is a
> > real delete on those keyboards.
>
> none of these works with an rc shell. all i see is:
>
> ^[[3~

You must be running p9p rc in a terminal window on the mac!
For that the interrupt key is whatever stty all shows you.
Probably ^C. If you are running rc under p9p acme or 9vx on
the mac fn+delete is the interrupt key. The same works with
a remote X windows p9p acme or 9vx or plan9/qemu running rc.

andrey mirtchovski

unread,
Sep 25, 2012, 5:50:41 AM9/25/12
to
> You must be running p9p rc in a terminal window on the mac!
> For that the interrupt key is whatever stty all shows you.
> Probably ^C. If you are running rc under p9p acme or 9vx on
> the mac fn+delete is the interrupt key. The same works with
> a remote X windows p9p acme or 9vx or plan9/qemu running rc.

great! now how do we solve OP's problem?

andrey mirtchovski

unread,
Sep 25, 2012, 5:49:25 AM9/25/12
to

works with my old copy of p9p in 9term.  when did p9p go broken?


i don't know. here's what i got with mac book and normal keyboards plugged in today:


notably, ctrl+c worked.
 

Bakul Shah

unread,
Sep 25, 2012, 6:07:22 AM9/25/12
to
If he is running rc in a terminal window, he can use ^C. If
he is running rc in acme, he can use fn+delete to kill a
program. Assuming I have not misunderstood his problem. Which
I probably have, given how many messages have been exchanged!

hiro

unread,
Sep 25, 2012, 6:51:40 AM9/25/12
to
Just use a multitouch gesture on the magic mouse. This makes it
completely keyboard agnostic.

Kurt H Maier

unread,
Sep 25, 2012, 7:04:37 AM9/25/12
to
delete to kill a program is a function of rio/9term/acme, not a function
of rc.

Bruce Ellis

unread,
Sep 25, 2012, 7:28:59 AM9/25/12
to
"hit with brick - fixed!" - unknown source

Christian Neukirchen

unread,
Sep 25, 2012, 11:33:31 AM9/25/12
to
Not true. It's a feature of the terminal line discipline.

% stty
speed 38400 baud; line = 0;
intr = ^?; erase = ^H;

(The problem is that this only allows single chars as special keys,
so you can't bind '^[[3~'.)

(Actually, p9p 9term always sends the current intr-char on Delete, while
acme/win and matty's 9term always send ^?.)

Cheers,
--
Christian Neukirchen <chneuk...@gmail.com> http://chneukirchen.org

erik quanstrom

unread,
Sep 25, 2012, 12:45:43 PM9/25/12
to
On Tue Sep 25 11:44:21 EDT 2012, chneuk...@gmail.com wrote:
> kh...@intma.in (Kurt H Maier) writes:
>
> > On Tue, Sep 25, 2012 at 08:52:40AM +0000, Christopher Hobbs wrote:
> >> Being that macs don't have a proper delete key, how can I get delete
> >> behavior to kill a program in rc short of slapping a real keyboard
> >> on this machine?
> >>
> > delete to kill a program is a function of rio/9term/acme, not a function
> > of rc.
>
> Not true. It's a feature of the terminal line discipline.
>
> (The problem is that this only allows single chars as special keys,
> so you can't bind '^[[3~'.)
>
> (Actually, p9p 9term always sends the current intr-char on Delete, while
> acme/win and matty's 9term always send ^?.)

the interrupt is delivered through the star wars-vintage
imperial garbage chute known as the tty subsystem, but
when i start 9term, stty intr is reset from ^C to ^?.
and if i change it back, then the fn+delete generates
escape codes, rather than an interrupt.

- erik

Jiten Pathy

unread,
Sep 25, 2012, 2:49:03 PM9/25/12
to
Not surprisingly i have 15+ threaded mail relted to osx.

Yaroslav

unread,
Sep 26, 2012, 3:21:42 AM9/26/12
to
just to make it clear: is this in 9term?

2012/9/25 andrey mirtchovski <mirtc...@gmail.com>:
--
- Yaroslav

Christian Neukirchen

unread,
Sep 26, 2012, 4:35:26 AM9/26/12
to
Not on my p9p 9term:

% stty
speed 38400 baud; line = 0;
intr = ^?; erase = ^H;
-brkint -imaxbel
-onlcr onocr
% cat
^?
% stty intr '^C'
% cat
^C
% cat
<Press C-c, RET here>
^C

I pressed DEL twice, and after that C-c. The second DEL sends C-c, see
/opt/plan9/src/cmd/9term/9term.c:441:winterrupt(Window *w)

erik quanstrom

unread,
Sep 26, 2012, 7:43:27 AM9/26/12
to
> >> > delete to kill a program is a function of rio/9term/acme, not a function
> >> > of rc.
> >>
> >> Not true. It's a feature of the terminal line discipline.
> >>
> >> (The problem is that this only allows single chars as special keys,
> >> so you can't bind '^[[3~'.)
> >>
> >> (Actually, p9p 9term always sends the current intr-char on Delete, while
> >> acme/win and matty's 9term always send ^?.)
> >
> > the interrupt is delivered through the star wars-vintage
> > imperial garbage chute known as the tty subsystem, but
> > when i start 9term, stty intr is reset from ^C to ^?.
> > and if i change it back, then the fn+delete generates
> > escape codes, rather than an interrupt.
>
> Not on my p9p 9term:
>

uh, looks like you didn't read what i wrote. that's exactly what
i said.

- erik

Christian Neukirchen

unread,
Sep 26, 2012, 11:50:03 AM9/26/12
to
quan...@quanstro.net (erik quanstrom) writes:

>> > the interrupt is delivered through the star wars-vintage
>> > imperial garbage chute known as the tty subsystem, but
>> > when i start 9term, stty intr is reset from ^C to ^?.
>> > and if i change it back, then the fn+delete generates
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> > escape codes, rather than an interrupt.
^^^^^^^^^^^^
>>
>> Not on my p9p 9term:
>>
>
> uh, looks like you didn't read what i wrote. that's exactly what
> i said.

This is not what's happening: delete (which you type as fn-backspace, I
guess?) always sends the intr char, nevermind what it is set to
(in 9term, not acme!).
0 new messages