From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Forrest Y. Yu" Newsgroups: gmane.emacs.help Subject: Re: `global-set-key' doesn't work in my console Date: Fri, 11 Jan 2008 00:37:42 +0800 Message-ID: References: <2FC893F4-AA95-4308-AC3C-361FBECEF086@web.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0285809990==" X-Trace: ger.gmane.org 1199983100 16092 80.91.229.12 (10 Jan 2008 16:38:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Jan 2008 16:38:20 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Peter Dyballa" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 10 17:38:38 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JD0QM-0003eW-Gb for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2008 17:38:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JD0Py-0003pB-Us for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2008 11:38:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JD0PZ-0003iv-LV for help-gnu-emacs@gnu.org; Thu, 10 Jan 2008 11:37:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JD0PY-0003h9-5r for help-gnu-emacs@gnu.org; Thu, 10 Jan 2008 11:37:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JD0PX-0003gq-Vm for help-gnu-emacs@gnu.org; Thu, 10 Jan 2008 11:37:44 -0500 Original-Received: from an-out-0708.google.com ([209.85.132.248]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JD0PX-0001m3-PA for help-gnu-emacs@gnu.org; Thu, 10 Jan 2008 11:37:43 -0500 Original-Received: by an-out-0708.google.com with SMTP id c25so148590ana.84 for ; Thu, 10 Jan 2008 08:37:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=NQ2tGJO495czlEXl30uFYP/Oz/STd+IssXv7CwFL2eA=; b=hRPtXUdvGZ2YGsSZDhkpTP+byR2LscaETANOqOsxcvULDpZ7tGK5oQku0qZFkZGasniHc4crg7SDITLE9hMgDQMHtx/7UKNbdKkRD0TBwrV/bzT4S4orptwylM3k3jO6POWwhnhTNvpZfErE6RqVAsaTMpXvN0TyR6HRIqXULkg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=D6oJll0diRYUPX/yvyNVz70cdh9NixyrKtK0YD9x1EhLpIrRcRppo3tZFOWNq0vLITOqnruDfbUEFGOGG8D2+w0anTdJhIzbcBawIhMNIQ3KNmRa+binrsosppz3CIr5sWS7zvoe/F6SATp/C5xKijNaGPlrH+Chp9bMbxaIQyA= Original-Received: by 10.100.110.15 with SMTP id i15mr4552620anc.49.1199983062688; Thu, 10 Jan 2008 08:37:42 -0800 (PST) Original-Received: by 10.100.135.11 with HTTP; Thu, 10 Jan 2008 08:37:42 -0800 (PST) In-Reply-To: <2FC893F4-AA95-4308-AC3C-361FBECEF086@web.de> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:50628 Archived-At: --===============0285809990== Content-Type: multipart/alternative; boundary="----=_Part_26873_17479943.1199983062678" ------=_Part_26873_17479943.1199983062678 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Jan 10, 2008 8:51 PM, Peter Dyballa < Peter_Dyballa@web.de> wrote: > > Am 09.01.2008 um 10:48 schrieb Forrest: > > > > i tried to figure out why, then i googled much but got little > > helpful, it > > seems that `terminfo' is the point but i cannot understand what it > > is, the > > output of 'infocmp' is a mess for me :( > > It's not that. It's ASCII: > > C-@ -> \000 or NUL > C-a -> \001 > C-b -> \002 > ... > C-z -> \032 > C-[ -> \033 > C-\ -> \034 > C-] -> \035 > C-^ -> \036 > C-_ -> \037 > SPC -> \040 > > This has nothing to do with terminfo. The latter is for drawing and > moving the cursor on an alpha-numeric text screen. > > -- > Greetings > > Pete > > It isn't pollution that's harming the environment. It's the > impurities in our air and water that are doing it. > > > > Thank you very much Pete! I think I've got it. 1. It's the keyboard driver that ignores key-combinations like `C-,' (mentioned by Andreas). When I press `C-,', the keyboard driver received it and does nothing, so the terminal doesn't even know I've press keys. That's why emacs cannot accept `C-,' ---- emacs doesn't even know the key-press action! 2. The keyboard driver gives an ASCII code to any `Ctrl-' thing it thinks reasonable. The code is actually "stolen" from the ASCII table. Because the Char 0~32 will never be generated by a keyboard, they can be used for any purpose the driver wants. That's why Pete and Nick asked me to see `man ascii'. 3. When a key like F1~F12 or HOME, END are pressed, a key sequence begins with a ESC(27) will be passed to the terminal, and probably be passed on to emacs. 4. I guess that the keyboard driver used in an X is different with that used in a console. The former passed each key-press to a program, but not ignore combinations like `C-,'. Thus emacs in an X can receive every press of mine. Again, a lot of thanks to Pete, and Nick, and Andreas, and everyone who helped me in this question. I just reviewed all the messages I received. I didn't understand what I've read because I took it for granted that the keyboard driver will pass everything to the terminal. Best Regards, Forrest Y. Yu -- Stupid is as stupid does. ------=_Part_26873_17479943.1199983062678 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
On Jan 10, 2008 8:51 PM, Peter Dyballa < Peter_Dyballa@web.de> wrote:
>
> Am 09.01.2008 um 10:48 schrieb Forrest:
>
>
> > i tried to figure out why, then i googled much but got little
> > helpful, it
> > seems that `terminfo' is the point but i cannot understand what it
> > is, the
> > output of 'infocmp' is a mess for me :(
>
> It's not that. It's ASCII:
>
> C-@ -> \000 or NUL
> C-a -> \001
> C-b -> \002
> ...
> C-z -> \032
> C-[ -> \033
> C-\ -> \034
> C-] -> \035
> C-^ -> \036
> C-_ -> \037
> SPC -> \040
>
> This has nothing to do with terminfo. The latter is for drawing and
> moving the cursor on an alpha-numeric text screen.
>
> --
> Greetings
>
> Pete
>
> It isn't pollution that's harming the environment. It's the
> impurities in our air and water that are doing it.
>
>
>
>


Thank you very much Pete! I think I've got it.

1. It's the keyboard driver that ignores key-combinations like `C-,' (mentioned by Andreas). When I press `C-,', the keyboard driver received it and does nothing, so the terminal doesn't even know I've press keys. That's why emacs cannot accept `C-,' ---- emacs doesn't even know the key-press action!
2. The keyboard driver gives an ASCII code to any `Ctrl-' thing it thinks reasonable. The code is actually "stolen" from the ASCII table. Because the Char 0~32 will never be generated by a keyboard, they can be used for any purpose the driver wants. That's why Pete and Nick asked me to see `man ascii'.
3. When a key like F1~F12 or HOME, END are pressed, a key sequence begins with a ESC(27) will be passed to the terminal, and probably be passed on to emacs.
4. I guess that the keyboard driver used in an X is different with that used in a console. The former passed each key-press to a program, but not ignore combinations like `C-,'. Thus emacs in an X can receive every press of mine.

Again, a lot of thanks to Pete, and Nick, and Andreas, and everyone who helped me in this question. I just reviewed all the messages I received. I didn't understand what I've read because I took it for granted that the keyboard driver will pass everything to the terminal.

Best Regards,
Forrest Y. Yu


--
Stupid is as stupid does. ------=_Part_26873_17479943.1199983062678-- --===============0285809990== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============0285809990==--