Discussion:
p9p backspace/delete in osx
(too old to reply)
Christopher Hobbs
2012-09-25 08:52:40 UTC
Permalink
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
2012-09-25 09:06:54 UTC
Permalink
Post by Christopher Hobbs
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?
i think it's function or apple +backspace. (doesn't work through a kvm.)

- erik
Bakul Shah
2012-09-25 09:22:26 UTC
Permalink
Post by erik quanstrom
Post by Christopher Hobbs
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?
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.
erik quanstrom
2012-09-25 09:26:06 UTC
Permalink
Post by Bakul Shah
Post by erik quanstrom
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
andrey mirtchovski
2012-09-25 09:39:14 UTC
Permalink
Post by erik quanstrom
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 :)
Bakul Shah
2012-09-25 09:47:52 UTC
Permalink
Post by andrey mirtchovski
Post by erik quanstrom
obviously not necessary when using a full-size keyboard, and there is a
real delete on those keyboards.
^[[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.
Post by andrey mirtchovski
printed with each method. repeatedly as i bash the keyboard with my stubby
fingers :)
andrey mirtchovski
2012-09-25 09:50:41 UTC
Permalink
Post by Bakul Shah
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?
Bakul Shah
2012-09-25 10:07:22 UTC
Permalink
Post by andrey mirtchovski
Post by Bakul Shah
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?
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
2012-09-25 10:51:40 UTC
Permalink
Just use a multitouch gesture on the magic mouse. This makes it
completely keyboard agnostic.
Yaroslav
2012-09-26 07:21:42 UTC
Permalink
just to make it clear: is this in 9term?
Post by andrey mirtchovski
Post by erik quanstrom
obviously not necessary when using a full-size keyboard, and there is a
real delete on those keyboards.
^[[3~
printed with each method. repeatedly as i bash the keyboard with my stubby
fingers :)
--
- Yaroslav
erik quanstrom
2012-09-25 09:42:48 UTC
Permalink
Post by andrey mirtchovski
Post by erik quanstrom
obviously not necessary when using a full-size keyboard, and there is a
real delete on those keyboards.
^[[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
andrey mirtchovski
2012-09-25 09:49:25 UTC
Permalink
Post by erik quanstrom
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:

Loading Image...

notably, ctrl+c worked.
Kurt H Maier
2012-09-25 11:04:37 UTC
Permalink
Post by Christopher Hobbs
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.
Bruce Ellis
2012-09-25 11:28:59 UTC
Permalink
"hit with brick - fixed!" - unknown source
Post by Kurt H Maier
Post by Christopher Hobbs
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.
Christian Neukirchen
2012-09-25 15:33:31 UTC
Permalink
Post by Kurt H Maier
Post by Christopher Hobbs
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.

% 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 <***@gmail.com> http://chneukirchen.org
erik quanstrom
2012-09-25 16:45:43 UTC
Permalink
Post by Christian Neukirchen
Post by Kurt H Maier
Post by Christopher Hobbs
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
2012-09-25 18:49:03 UTC
Permalink
Not surprisingly i have 15+ threaded mail relted to osx.
Post by erik quanstrom
Post by Christian Neukirchen
Post by Kurt H Maier
Post by Christopher Hobbs
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
Post by Christian Neukirchen
Post by Kurt H Maier
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
Christian Neukirchen
2012-09-26 08:35:26 UTC
Permalink
Post by erik quanstrom
Post by Christian Neukirchen
Post by Kurt H Maier
Post by Christopher Hobbs
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.
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)
--
Christian Neukirchen <***@gmail.com> http://chneukirchen.org
erik quanstrom
2012-09-26 11:43:27 UTC
Permalink
Post by erik quanstrom
Post by Christian Neukirchen
Post by Kurt H Maier
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.
uh, looks like you didn't read what i wrote. that's exactly what
i said.

- erik
Christian Neukirchen
2012-09-26 15:50:03 UTC
Permalink
Post by erik quanstrom
Post by erik quanstrom
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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Post by erik quanstrom
Post by erik quanstrom
escape codes, rather than an interrupt.
^^^^^^^^^^^^
Post by erik quanstrom
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!).
--
Christian Neukirchen <***@gmail.com> http://chneukirchen.org
Loading...