Re: [Mac-emacs-users] [Mac-emacs-users]
Brought to you by:
akochoi
|
From: Andrew C. <ak...@sh...> - 2002-10-03 22:19:34
|
> [...] The solution is to make RET appear to be a non-ascii
> character (then it becomes <return>). This is what happens on
> X-windows as you have noted. To do this, modify
> macterm.c:keycode_to_xkeysym_table[] to start like this (where
> keycode 0x24 is mapped to Xkeysym 0xff0d)
>
> static unsigned char keycode_to_xkeysym_table[] = {
> /* 0x00 - 0x3f */
> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, '\x0d', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
>
> Then you need to have emacs recognize the the new key [return] is
> actually C-m. So add these to lisp/term/mac-win.el or to your
> .emacs file
>
> (define-key function-key-map [return] [?\C-m])
> (define-key function-key-map [M-return] [?\M-\C-m])
> (put 'return 'ascii-character 13)
>
> Should this be put in the main distribution? Should this be done
> for other chars like escape and tab?
Hi Steven,
Thank you for solving this problem. I've checked that the above
modification works on my machine. Please go ahead and install it to
the main distribution. I suggest putting the Lisp definitions of
`return' in lisp/term/mac-win.el so the return key will work as before
for everyone. It will also be useful to do the same for the tab and
escape keys.
Andrew.
|