Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Apr 2001 20:37:16 +0300
From:      Peter Pentchev <roam@orbitel.bg>
To:        Harry Putnam <reader@newsguy.com>
Cc:        freebsd-mobile@FreeBSD.ORG
Subject:   Re: alt/meta on toshiba
Message-ID:  <20010421203716.I458@ringworld.oblivion.bg>
In-Reply-To: <m3u23i2mi2.fsf@gnus.cvs.983032537>; from reader@newsguy.com on Sat, Apr 21, 2001 at 10:30:18AM -0700
References:  <m31yqm42rq.fsf@gnus.cvs.983032537> <20010421200015.G458@ringworld.oblivion.bg> <m3u23i2mi2.fsf@gnus.cvs.983032537>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Apr 21, 2001 at 10:30:18AM -0700, Harry Putnam wrote:
> Peter Pentchev <roam@orbitel.bg> writes:
> 
> [...]
> 
> > > I'm an emacs user and would like to use the left alt on my keyboard
> > > for emacs `meta' key rather than having to use ESC.
> 
> [...]
> 
> > > Is this a hardware thing that cannot be changed or something OS
> > > related I can do to make the left alt key work for emacs?
> > 
> > Indeed, this is something OS-related.  The kernel does not treat the Alt
> > keys as Meta at all.  For a patch against 4.x-stable (made against 4.2-STABLE,
> > but works perfectly well against 4.3-RELEASE or 4.3-STABLE), see
> > http://people.FreeBSD.org/~roam/bsd/
> 
> Cool, but to bother you a bit further.  How does one apply a patch
> like this.  Or rather, where to look to read up on how to apply a
> patch like this?

Well, since you're tracking -stable, you should already now how to
cvsup and make buildworld/installworld :)  So I'll skip that part.

The important part here is the patch itself - simple :)  Change to
/usr/src, or wherever you keep your sources, and do:

patch -p1 < /path/to/alt_is_meta-RELENG-4.patch

(after you've downloaded and uncompressed it).

The -p1 and the change to the source directory is just to make sure
that there are no mistakes - it is perfectly safe to do this from /usr
and use patch -p0, if your FreeBSD sources are in /usr/src.

Then you'll have to run mergemaster and build/installworld as usual.
Running mergemaster could be skipped, if you put the new sysctl
(kern.alt_is_meta) in your /etc/sysctl.conf, but if you don't, you
may put alt_is_meta="YES" in your /etc/rc.conf, and rc.i386 shall
do the work for you.  Yes, yes, I know, I should move the sysctl
to something other than kern.*, and I should move the patch to
rc.syscons instead of rc.i386.. but given that I seem to be the only
user of that patch so far, this has been somewhat postponed ;)

The bad news?  You'll have to reverse and reapply the patch
each time you cvsup :)  Reversing is easy, change to /usr/src and run:

patch -R -p1 < /path/to/alt_is_meta-RELENG-4.patch

> Also, there must be others using emacs and alt/meta some way before
> now isn't there?

Well, when I originally posted the patch to -hackers, I received
several responses telling me that Alt works just fine as the Meta
key in X..  You and I seem to be among those last console die-hards ;)

G'luck,
Peter

-- 
This sentence contains exactly threee erors.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010421203716.I458>