From owner-freebsd-mobile Sat Apr 21 10:39: 2 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id 3892737B423 for ; Sat, 21 Apr 2001 10:38:55 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 81028 invoked by uid 1000); 21 Apr 2001 17:37:16 -0000 Date: Sat, 21 Apr 2001 20:37:16 +0300 From: Peter Pentchev To: Harry Putnam Cc: freebsd-mobile@FreeBSD.ORG Subject: Re: alt/meta on toshiba Message-ID: <20010421203716.I458@ringworld.oblivion.bg> Mail-Followup-To: Harry Putnam , freebsd-mobile@FreeBSD.ORG References: <20010421200015.G458@ringworld.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from reader@newsguy.com on Sat, Apr 21, 2001 at 10:30:18AM -0700 Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, Apr 21, 2001 at 10:30:18AM -0700, Harry Putnam wrote: > Peter Pentchev 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