[comp.emacs] Setting the Mark in emacses

consp04@bingvaxu.cc.binghamton.edu (Daniel F. Boyd) (07/20/89)

When using GNU Emacs on our VAX 8530, with a VT220 terminal,
I can quickly and easily set the mark with control-spacebar.
The terminal likes to send a ^@ (which I think is actually
ASCII 0; a NULL) when you hit control-space.

I have yet to see any Emacs for the PC set the mark with
control-spacebar.  I know that in order to trap
control-space, you have to look at the BIOS shift byte (with
which you could tell not only if the control, shift, or alt
keys are pressed, but also left or right shift key, left or
right control on 101-key keyboards, or whatever.

I also have yet to see terminal emulation software that
sends a ^@ when I hit control-space.

Whenever I hit C-SPC I get a space on the screen.

MS-Kermit seems to be able to read the BIOS shift byte; you
take the scancode of the key and add 512 for shift, 1024 for
Control, and 2048 for Alt to get the key number for a SET
KEY statement in a kermit script.  It works fine for
Alt-this and Control-that, but it is unable to trap
shift-space, control-space, and alt-space.

Am I crazy, or is there a conspiracy?  I want control-space!

Does Freemacs use control-space to set the mark, or is that
a lost hope?


-- 
Daniel F. Boyd				| "If it wasn't for disappointments,
Student Consultant, SUNY Binghamton     |  I wouldn't have any appointments."
consp04@bingvaxu.cc.binghamton.edu	| 	-- They Might Be Giants

hollen@zeta.megatek.uucp (Dion Hollenbeck) (07/21/89)

From article <2308@bingvaxu.cc.binghamton.edu>, by consp04@bingvaxu.cc.binghamton.edu (Daniel F. Boyd):
> When using GNU Emacs on our VAX 8530, with a VT220 terminal,
> I can quickly and easily set the mark with control-spacebar.
> The terminal likes to send a ^@ (which I think is actually
> ASCII 0; a NULL) when you hit control-space.
> 
> Am I crazy, or is there a conspiracy?  I want control-space!
> 
I am using Gnu-Emacs on a Sun BSD4.3 and the key mapping that is
normal here is ESC space.  Even though it is not exactly what
you want, maybe if there is no solution forthcoming for control-space,
you could use ESC space instead.  This is a pretty easy sequence
to key since you are still using two keys, just one different, and
in sequence instead of in combination.

	Dion Hollenbeck             (619) 455-5590 x2814
	Megatek Corporation, 9645 Scranton Road, San Diego, CA  92121

        uunet!megatek!hollen       or  hollen@megatek.uucp

las) (07/24/89)

From article <2308@bingvaxu.cc.binghamton.edu>, by consp04@bingvaxu.cc.binghamton.edu (Daniel F. Boyd):
> When using GNU Emacs on our VAX 8530, with a VT220 terminal,
> I can quickly and easily set the mark with control-spacebar.
> The terminal likes to send a ^@ (which I think is actually
> ASCII 0; a NULL) when you hit control-space.
[Can't do same on PC]
> Am I crazy, or is there a conspiracy?  I want control-space!

Depends on how you define conspiracy.  Most people don't get the scan code
and the current shift state and interpret keycodes themselves, they let
the BIOS do it.  If you use INT 16 to read the keyboard, ctrl-space is
just space.  Ctrl-@ (or ctrl-2) returns a 0 code in AL and 3 in AH.  If
you use INT 21 to read the keyboard then once again, ctrl-space is just
space and ctrl-@ is 0 followed by 3 because DOS uses the zero code to 
indicate that the next keycode is an extended key - i.e., pressing 
function keys and other extended keys results in DOS returning a two 
code sequence, requiring two separate reads, which always begins with a 
zero code.

Depending on what the author of the program you are running did, you
may be able to get what you want by pressing ctrl-@.

Good luck, Larry
-- 
Signed: Larry A. Shurr (cbema!las@att.ATT.COM or att!cbema!las)
Clever signature, Wonderful wit, Outdo the others, Be a big hit! - Burma Shave
(With apologies to the real thing.  The above represents my views only.)
(Please note my mailing address.  Mail sent directly to cbnews doesn't make it.)

kim@kannel.lut.fi (Kimmo Suominen) (07/25/89)

Using ESC SPC to set the mark on GNU Emacs would be questionable at least to
me - it is originally bound to 'just-one-space'.

Kim
--
 ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
( Kimmo Suominen              Electronic Mail on Internet:  kim@kannel.lut.fi )
( "That's what I think!"                         on Funet:  KUULA::KIM        )
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

rbj@dsys.ncsl.nist.GOV (Root Boy Jim) (07/28/89)

? From: Dion Hollenbeck <hp-sdd!megatek!zeta!hollen@hplabs.hp.com>

? > Am I crazy, or is there a conspiracy?  I want control-space!

There is no such defined character as control space. The proper way to
generate ^@ is control-@.  However, some terminal manufacturers'
keybaords (notably DEC and SUN) will transmit ^@ when that particular
sequence is typed. You have been taking advantage of a happy accident.

There is no problem with using M-SPC. Move just-one-space elsewhere.

? 	Dion Hollenbeck             (619) 455-5590 x2814
? 	Megatek Corporation, 9645 Scranton Road, San Diego, CA  92121

?         uunet!megatek!hollen       or  hollen@megatek.uucp

	Root Boy Jim
	Have GNU, Will Travel.

darin@nova.laic.uucp (Darin Johnson) (07/29/89)

In article <8907271911.AA18526@dsys.ncsl.nist.gov> rbj@dsys.ncsl.nist.GOV (Root Boy Jim) writes:
>? From: Dion Hollenbeck <hp-sdd!megatek!zeta!hollen@hplabs.hp.com>
>
>? > Am I crazy, or is there a conspiracy?  I want control-space!
>
>There is no such defined character as control space. The proper way to
>generate ^@ is control-@.  However, some terminal manufacturers'
>keybaords (notably DEC and SUN) will transmit ^@ when that particular
>sequence is typed.

I would think that any workstation/pc/whatever that records keystrokes
as 'char + modifiers' would be able to detect C-SPC.  This probably
excludes most terminals, since keys are converted to ASCII before
the computer sees them.  Of course, if Emacs reads the ascii codes
after translation, it may be difficult.  The micro-style-emacs I use
(mg2a on Amiga) can pick pick up a control or meta modifier on any key
(including the mouse).  In fact, with a minor hack, I could have it tell
the diff between left and right shift|alt|Amiga-key, but this probably
wouldn't be useful to many people (except LispM user's).  I would think
that many other computers would have similar facilities.
Darin Johnson (leadsv!laic!darin@pyramid.pyramid.com)
	We now return you to your regularly scheduled program.