jayduhon / inferno-os

Automatically exported from code.google.com/p/inferno-os
2 stars 0 forks source link

Why does MacOSX readkbd() call cleanexit(0) when DELETE is pressed? #246

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start emu
2. Press "DELETE"
3. emu exits.

What is the expected output? What do you see instead?

Please use labels and text to provide additional information.

Should MacOSX more closely follow Linux behavior (CTRL-C calls cleanexit(0), 
DELETE backspaces terminal)?

Original issue reported on code.google.com by joseph.s...@gmail.com on 20 Jan 2011 at 5:16

GoogleCodeExporter commented 9 years ago
that's strange. if i ssh to my mac mini, i get control-H (backspace) as 
character erase and DEL (0x7f) as the interrupt character. still, the easiest 
thing is probably to pick up the ones in use on entry, and the best thing would 
be to switch off raw mode for the console (as opposed to things typed to the 
graphics window, when they are separate)

Original comment by Charles....@gmail.com on 20 Jan 2011 at 4:52

GoogleCodeExporter commented 9 years ago
I've tested this on two separate MacOSX 10.6 (Intel MacBook Pro and Intel Mac 
Mini) machines (both via Terminal.app and ssh from a Linux box) and they have 
the same behavior. I can test on a MacOSX 10.5 (PowerPC) machine later to see 
if it is different.

Original comment by joseph.s...@gmail.com on 20 Jan 2011 at 8:49

GoogleCodeExporter commented 9 years ago
openbsd has the same behaviour as mac os x:  a backspace generates 0x7f (under 
uxterm and in console when not in ICANON), the delete button generates 0x7f too 
under uxterm, but not in the console.  i usually just type ^h, so it doesn't 
bother me much.

"switching off raw mode", that would include keeping ISIG right?  so you can 
suspend & resume emu's.

anyway, treating ctrl-c on openbsd as currently on linux would be helpful.

Original comment by mechiel@ueber.net on 23 Feb 2011 at 4:01

GoogleCodeExporter commented 9 years ago
OS X's Terminal.app defaults to not sending backspace (deleteSendsBackspace = 
0):

   `defaults read com.apple.Terminal | grep deleteSendsBackspace'

The opposite is the case in the X11 terminal for some reason I do not have an 
answer for at this time.  If you enable "delete sends Ctrl-H" in the 
preferences, then you'll have to ensure that 'stty erase ^H' has been set for 
any other terminal usage.

I wouldn't mind making a concise exit from emu a key combination that isn't 
ctrl-c  or the 'delete' key on OSX.  Is there a specific set of key 
combinations that could be standardized for all versions of emu?

Original comment by jas@corpus-callosum.com on 2 May 2011 at 4:28