* Alt vs Meta - Sun keyboard, redhat linux @ 2010-12-31 23:21 chengiz 2011-01-01 19:35 ` Peter Dyballa [not found] ` <mailman.6.1293910561.32515.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 8+ messages in thread From: chengiz @ 2010-12-31 23:21 UTC (permalink / raw) To: help-gnu-emacs Hi, I use a Sun Type 6 keyboard on a Redhat machine running Gnome. Here, by default in gnu emacs, the Alt key mapped to M- and the Meta key was unmapped. I want like on my older sun machine, to use the Meta key as M- and Alt key as A-. In gnome-keyboard-properties, under Layout Options -> Alt/Win key behaviour, I set "Meta is mapped to the Win-keys". This resulted in the Meta key being mapped to M- but the Alt key is still mapped to M-. How do I map the Alt key to A-? Thank you. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Alt vs Meta - Sun keyboard, redhat linux 2010-12-31 23:21 Alt vs Meta - Sun keyboard, redhat linux chengiz @ 2011-01-01 19:35 ` Peter Dyballa [not found] ` <mailman.6.1293910561.32515.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 8+ messages in thread From: Peter Dyballa @ 2011-01-01 19:35 UTC (permalink / raw) To: chengiz; +Cc: help-gnu-emacs Am 01.01.2011 um 00:21 schrieb chengiz: > In gnome-keyboard-properties, under Layout Options -> Alt/Win key > behaviour, I set "Meta is mapped to the Win-keys". This resulted in > the Meta key being mapped to M- but the Alt key is still mapped to M-. > How do I map the Alt key to A-? I'm not using GNOME. I'd use xmodmap to change the modifier keys. And I'd use xev to determine the key code or symbol name of the keys to change. In ~/.xinitrc you then can have: xmodmap ${HOME}/.xmodmaprc and .xmodmaprc can have a little "programme" like this: clear Mod1 clear Mod2 add Mod1 = Alt_L Alt_R add Mod2 = Meta_L Meta_R -- Greetings Pete It isn't pollution that's harming the environment. It's the impurities in our air and water that are doing it. ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.6.1293910561.32515.help-gnu-emacs@gnu.org>]
* Re: Alt vs Meta - Sun keyboard, redhat linux [not found] ` <mailman.6.1293910561.32515.help-gnu-emacs@gnu.org> @ 2011-01-03 20:25 ` chengiz 2011-01-03 22:53 ` Peter Dyballa [not found] ` <mailman.18.1294095231.614.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 8+ messages in thread From: chengiz @ 2011-01-03 20:25 UTC (permalink / raw) To: help-gnu-emacs On Jan 1, 2:35 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote: > Am 01.01.2011 um 00:21 schrieb chengiz: > > > In gnome-keyboard-properties, under Layout Options -> Alt/Win key > > behaviour, I set "Meta is mapped to the Win-keys". This resulted in > > the Meta key being mapped to M- but the Alt key is still mapped to M-. > > How do I map the Alt key to A-? > > I'm not using GNOME. > > I'd use xmodmap to change the modifier keys. And I'd use xev to > determine the key code or symbol name of the keys to change. > > In ~/.xinitrc you then can have: > > xmodmap ${HOME}/.xmodmaprc > > and .xmodmaprc can have a little "programme" like this: > > clear Mod1 > clear Mod2 > add Mod1 = Alt_L Alt_R > add Mod2 = Meta_L Meta_R > > -- > Greetings > > Pete > > It isn't pollution that's harming the environment. It's the impurities > in our air and water that are doing it. Which of these "Mod?"s does emacs use for its Alt modifier? My current xmodmap already has Alt_L at Mod1. I want emacs to treat this like Emacs-alt (ie. the rarely used Alt modifier mentioned at http://www.gnu.org/software/emacs/manual/html_node/emacs/Windows-Keyboard.html) rather than Emacs-meta. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Alt vs Meta - Sun keyboard, redhat linux 2011-01-03 20:25 ` chengiz @ 2011-01-03 22:53 ` Peter Dyballa [not found] ` <mailman.18.1294095231.614.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 8+ messages in thread From: Peter Dyballa @ 2011-01-03 22:53 UTC (permalink / raw) To: chengiz; +Cc: help-gnu-emacs Am 03.01.2011 um 21:25 schrieb chengiz: > Which of these "Mod?"s does emacs use for its Alt modifier? My current > xmodmap already has Alt_L at Mod1. I want emacs to treat this like > Emacs-alt (ie. the rarely used Alt modifier mentioned at > http://www.gnu.org/software/emacs/manual/html_node/emacs/Windows-Keyboard.html) > rather than Emacs-meta. Why do you think the Alt and Meta key modifiers have something to do with MS Losedos? The Meta modifier is the M in, for example, M-x. M-ESC is ESC-ESC. The Meta modifier is accepted by GNU Emacs as the "Meta" modifier. The Alt modifier can select up to two (two, because with and without Shift pressed) character keyboard layouts. On my keyboard, for example, Alt-a produces å and Alt-S-a Å. The Alt modifier is accepted by GNU Emacs as the "Alt" modifier. If you want to find out what some "Alt" named key on your keyboard produces, then use xev (best launched from a *shell* buffer in GNU Emacs), give it the focus and press that key. Xev will produce some cryptic output that can be deciphered to some meaning. Similarly proceed with the "Meta" titled key on your keyboard. With the information of the key codes these keys generate when pressed or released, you can reset "key bindings" in X11: keycode <whichever> = Alt_R keycode <whatever> = Meta_L Actually my first example was incomplete, because changing the sequence of modifiers does not change their meaning because the keys have also a keysym by which they are understood. When you write that you have the Alt_L modifier already defined, then find out which key produces this modifier event. Xev can be your friend. Once you've located the Alt_L key on your keyboard, you can use it in GNU Emacs. The xkeycaps utility might be able to have your keyboard layout loaded. Then you'll see graphically what you press. -- Greetings Pete Ce qui été compris n'existe plus. (Paul Eluard) ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.18.1294095231.614.help-gnu-emacs@gnu.org>]
* Re: Alt vs Meta - Sun keyboard, redhat linux [not found] ` <mailman.18.1294095231.614.help-gnu-emacs@gnu.org> @ 2011-01-04 17:12 ` chengiz 2011-01-04 22:47 ` Peter Dyballa [not found] ` <mailman.1.1294181287.10900.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 8+ messages in thread From: chengiz @ 2011-01-04 17:12 UTC (permalink / raw) To: help-gnu-emacs On Jan 3, 5:53 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote: > Why do you think the Alt and Meta key modifiers have something to do > with MS Losedos? Where do I think that? > If you want to find out what some "Alt" named key on your keyboard > produces, then use xev (best launched from a *shell* buffer in GNU > Emacs), give it the focus and press that key. Xev will produce some > cryptic output that can be deciphered to some meaning. Similarly > proceed with the "Meta" titled key on your keyboard. With the > information of the key codes these keys generate when pressed or > released, you can reset "key bindings" in X11: > > keycode <whichever> = Alt_R > keycode <whatever> = Meta_L > I used xev to verify that the Alt-key produces Alt_L and the 2 meta- keys produce Meta_L and Meta_R. Emacs treats the meta-keys as if they produced M- which is what I want, however it also treats the Alt-key as if produced M-, which is what I want to change to A-. I think the missing piece is what emacs is doing with Alt_L, as in why it is not processing it as A-. Here's my xmodmap output: shift Shift_L (0x32), Shift_R (0x3e) lock Caps_Lock (0x42) control Control_L (0x25), Control_R (0x6d) mod1 Alt_L (0x40), Alt_R (0x71), Alt_L (0x7d) mod2 Num_Lock (0x4d) mod3 mod4 Meta_L (0x73), Meta_R (0x74), Super_L (0x7f), Hyper_L (0x80), Meta_L (0x9c) mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c) I cant tell what to put in my xmodmaprc to make sure emacs behaves correctly. Thanks, chengiz ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Alt vs Meta - Sun keyboard, redhat linux 2011-01-04 17:12 ` chengiz @ 2011-01-04 22:47 ` Peter Dyballa [not found] ` <mailman.1.1294181287.10900.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 8+ messages in thread From: Peter Dyballa @ 2011-01-04 22:47 UTC (permalink / raw) To: chengiz; +Cc: help-gnu-emacs Am 04.01.2011 um 18:12 schrieb chengiz: > On Jan 3, 5:53 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote: >> Why do you think the Alt and Meta key modifiers have something to do >> with MS Losedos? > > Where do I think that? Because you inserted the link to some "Windows-Keyboard". > I think the missing piece is what emacs is doing with Alt_L, as in > why it is not processing it as A-. > Here's my xmodmap output: > shift Shift_L (0x32), Shift_R (0x3e) > lock Caps_Lock (0x42) > control Control_L (0x25), Control_R (0x6d) > mod1 Alt_L (0x40), Alt_R (0x71), Alt_L (0x7d) > mod2 Num_Lock (0x4d) > mod3 > mod4 Meta_L (0x73), Meta_R (0x74), Super_L (0x7f), Hyper_L > (0x80), Meta_L (0x9c) > mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c) > I cant tell what to put in my xmodmaprc to make sure emacs behaves > correctly. Modifier 5 cannot be Meta, Super, and Hyper altogether. When you launch GNU Emacs with -Q, without any customisation, does it still interpret Alt as Meta? If so, then my assumption about the parity of the modifiers is wrong and it plays a role that mod1 is Meta and mod2 or mod3 is Alt. Then Hyper and maybe Super can follow, but I think Mode_switch is more important, since it's the compose key, which allows to type ø as o / etc. Num_Lock can be pretty useless. In case Alt and Meta work correctly in 'emacs -Q', then something in your or your system's customisation (init files) is exchanging them. -- Greetings Pete When people run around and around in circles we say they are crazy. When planets do it we say they are orbiting. ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.1.1294181287.10900.help-gnu-emacs@gnu.org>]
* Re: Alt vs Meta - Sun keyboard, redhat linux [not found] ` <mailman.1.1294181287.10900.help-gnu-emacs@gnu.org> @ 2011-01-04 23:17 ` chengiz 2011-01-05 0:24 ` Peter Dyballa 0 siblings, 1 reply; 8+ messages in thread From: chengiz @ 2011-01-04 23:17 UTC (permalink / raw) To: help-gnu-emacs On Jan 4, 5:47 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote: > Am 04.01.2011 um 18:12 schrieb chengiz: > > > On Jan 3, 5:53 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote: > >> Why do you think the Alt and Meta key modifiers have something to do > >> with MS Losedos? > > > Where do I think that? > > Because you inserted the link to some "Windows-Keyboard". > > > I think the missing piece is what emacs is doing with Alt_L, as in > > why it is not processing it as A-. > > Here's my xmodmap output: > > shift Shift_L (0x32), Shift_R (0x3e) > > lock Caps_Lock (0x42) > > control Control_L (0x25), Control_R (0x6d) > > mod1 Alt_L (0x40), Alt_R (0x71), Alt_L (0x7d) > > mod2 Num_Lock (0x4d) > > mod3 > > mod4 Meta_L (0x73), Meta_R (0x74), Super_L (0x7f), Hyper_L > > (0x80), Meta_L (0x9c) > > mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c) > > I cant tell what to put in my xmodmaprc to make sure emacs behaves > > correctly. > > Modifier 5 cannot be Meta, Super, and Hyper altogether. > > When you launch GNU Emacs with -Q, without any customisation, does it > still interpret Alt as Meta? If so, then my assumption about the > parity of the modifiers is wrong and it plays a role that mod1 is Meta > and mod2 or mod3 is Alt. Then Hyper and maybe Super can follow, but I > think Mode_switch is more important, since it's the compose key, which > allows to type ø as o / etc. Num_Lock can be pretty useless. > > In case Alt and Meta work correctly in 'emacs -Q', then something in > your or your system's customisation (init files) is exchanging them. > There is no difference with -Q, it still interprets Alt as Meta. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Alt vs Meta - Sun keyboard, redhat linux 2011-01-04 23:17 ` chengiz @ 2011-01-05 0:24 ` Peter Dyballa 0 siblings, 0 replies; 8+ messages in thread From: Peter Dyballa @ 2011-01-05 0:24 UTC (permalink / raw) To: chengiz; +Cc: help-gnu-emacs Am 05.01.2011 um 00:17 schrieb chengiz: > There is no difference with -Q, it still interprets Alt as Meta. Are you going to change the sequence of the modifier definitions? (You don't need to restart GNU Emacs, it will receive the new changed key events.) Mine is sparse: shift Shift_L (0x40), Shift_R (0x44) lock Caps_Lock (0x41) control Control_L (0x43), Control_R (0x46) mod1 mod2 Meta_L (0x3f), Meta_R (0x47) mod3 mod4 mod5 ...not a desktop computer! -- Greetings Pete To drink without thirst and to make love all the time, madam, it is only these which distinguish us from the other beasts. – Beaumarchais ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-01-05 0:24 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-12-31 23:21 Alt vs Meta - Sun keyboard, redhat linux chengiz 2011-01-01 19:35 ` Peter Dyballa [not found] ` <mailman.6.1293910561.32515.help-gnu-emacs@gnu.org> 2011-01-03 20:25 ` chengiz 2011-01-03 22:53 ` Peter Dyballa [not found] ` <mailman.18.1294095231.614.help-gnu-emacs@gnu.org> 2011-01-04 17:12 ` chengiz 2011-01-04 22:47 ` Peter Dyballa [not found] ` <mailman.1.1294181287.10900.help-gnu-emacs@gnu.org> 2011-01-04 23:17 ` chengiz 2011-01-05 0:24 ` Peter Dyballa
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).