From: Forrest <forrest.yu@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: `global-set-key' doesn't work in my console
Date: Wed, 9 Jan 2008 00:32:05 +0800 [thread overview]
Message-ID: <e4d2b03e0801080832l6f790285v4201747916fcd21d@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2651 bytes --]
> Mike Mattie writes:
> > On Tue, 8 Jan 2008 15:38:08 +0800
> > Forrest <forrest.yu@gmail.com> wrote:
> >
> > > > > global-set-key (kbd "C-,")
> > > > > '(lambda () "scroll the page down" (interactive) (scroll-
> > > > > down 1)))
> >
> > try a space like this:
> > (kbd "C-c ,")
>
> Have you tried this? It won't work.
i tried, it worked
>
> > If that fixes it try using a function I previously posted that
eliminates
> > the errors from the process of defining keys.
>
> If it were so simple don't you think Emacs would do this?
>
> > (defun insert-key-notation ()
> > "inject a complete \(kbd \"sequence\"\) with key notation for a key
sequence given by prompt"
> > (interactive)
> > (insert "(kbd \"")
> > (insert (format-kbd-macro (read-key-sequence "Key? " nil t)))
> > (insert "\")"))
> >
> > it will define the kbd sexp for you after it prompts you for the key
sequence.
>
> It looks like the reason that it doesn't work has already been explained
but
> Forrest has decided not to accept the answer (or perhaps there is a
> communication problem)...
that's what you think, not what i think
>
> > > > The console and other terminal emulations can only produce "key
> > > > events" in the ASCII or extended ASCII range, i.e. 8 bit characters
> > > > (man ascii). Therefore not every time you hold down the control
> > > > "modifier" key and press some other key something with a meaning is
> > > > produced. It's like when you're scribbling on paper: not every
> > > > "picture" is a letter or a digit or worth an exhibition at MOMA ...
> > > > C-, can work X which has its own concept of events that are
> > > > abstracted from ASCII codes.
> > >
> > > C-x C-c work well in console, so i guess there must be something
> > > wrong with my key-binding settings. and also, emacs was designed in
> > > ages when X was not popular, it's unreasonable that custom
> > > key-binding doesn't work
>
> Do "man ascii". This is 128 character set and 96, or thereabout, are
printing
> characters. If there were a control character counterpart for each one
that
> would result in 192 character set. Presumably control characters only
exist
> for C-@ to C-_ (0 to 32, @ to _ being 64 to 96).
thank you for your patience, however, do you mean that only printing
characters and C-@ to C-_ can be processed by emacs?
then what if you press F1~F12? and Home, End, Del, Ins? and Left, Right, Up,
Down?
96 + (96 - 64) = 128 i hope i had understood you
>
> > > i'm a newbie, could you give me any detailed clue to solve it?
>
> On a normal console, I don't think you can.
>
> --
> Nick http://www.inet.net.nz/~nickrob
Forrest
--
Stupid is as stupid does.
[-- Attachment #1.2: Type: text/html, Size: 3623 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
next reply other threads:[~2008-01-08 16:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 16:32 Forrest [this message]
2008-01-08 19:31 ` `global-set-key' doesn't work in my console Peter Dyballa
2008-01-09 9:48 ` Forrest
2008-01-10 12:51 ` Peter Dyballa
2008-01-10 16:37 ` Forrest Y. Yu
-- strict thread matches above, loose matches on Subject: below --
2008-01-07 8:03 Forrest
2008-01-07 9:51 ` Peter Dyballa
2008-01-07 15:40 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e4d2b03e0801080832l6f790285v4201747916fcd21d@mail.gmail.com \
--to=forrest.yu@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).