* Behavior of M-x and A-x @ 2008-08-11 17:48 Peter Weiss 2008-08-11 19:21 ` Xah 0 siblings, 1 reply; 11+ messages in thread From: Peter Weiss @ 2008-08-11 17:48 UTC (permalink / raw) To: help-gnu-emacs Hello, sitting on a Sun keyboard, which behaves always a bit unusual... There are two keys on my keyboard: One marked with a diamond and the other one with "Alt" letters. Both behave different. So "M-x" and "A-x" give different commands. The usual meta commands like "M-x", "M-q", etc. are bound to the M-key, all the A-<keys> seem to be unbound. Is there a way to make emacs use A-key like the meta key? TIA -- Peter -- Peter.Weiss@consol.de ConSol* Software GmbH Phone +49 89 45841-100 Consulting & Solutions Mobile +49 177 6040121 Franziskanerstr. 38 http://www.consol.de D-81669 München ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Behavior of M-x and A-x 2008-08-11 17:48 Behavior of M-x and A-x Peter Weiss @ 2008-08-11 19:21 ` Xah 2008-08-11 19:54 ` Lennart Borgman (gmail) [not found] ` <mailman.16401.1218484505.18990.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 11+ messages in thread From: Xah @ 2008-08-11 19:21 UTC (permalink / raw) To: help-gnu-emacs On Aug 11, 10:48 am, Peter Weiss <Peter.We...@ConSol.de> wrote: > Hello, > > sitting on a Sun keyboard, which behaves always a bit unusual... > > There are two keys on my keyboard: One marked with a diamond and the > other one with "Alt" letters. Both behave different. So "M-x" and > "A-x" give different commands. The usual meta commands like "M-x", > "M-q", etc. are bound to the M-key, all the A-<keys> seem to be > unbound. > > Is there a way to make emacs use A-key like the meta key? not sure how to do it on Solaris. But on Windows and Mac, do it like this: ; setting the PC keyboard's various keys to Super or Hyper (setq w32-pass-lwindow-to-system nil w32-pass-rwindow-to-system nil w32-pass-apps-to-system nil w32-lwindow-modifier 'super ;; Left Windows key w32-rwindow-modifier 'super ;; Right Windows key w32-apps-modifier 'hyper) ;; Menu key ; various settings for the Mac keyboard (setq mac-option-modifier 'hyper) ; sets the Option key as Hyper (setq mac-option-modifier 'super) ; sets the Option key as Super (setq mac-command-modifier 'meta) ; sets the Command key as Meta (setq mac-control-modifier 'meta) ; sets the Control key as Meta Then, The syntax for defining keys with the Super or Hyper modifier keys is the same as Meta and Control. Use “H” for Hyper, “s” for Super. Example: (global-set-key (kbd "H-b") 'cmd) ; H is for hyper (global-set-key (kbd "s-b") 'cmd) ; lower case “s” is for super (global-set-key (kbd "M-H-b") 'cmd) ; Meta+Hyper+b (global-set-key (kbd "M-s-b") 'cmd) ; Meta+Super+b http://xahlee.org/emacs/keyboard_shortcuts.html Xah ∑ http://xahlee.org/ ☄ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Behavior of M-x and A-x 2008-08-11 19:21 ` Xah @ 2008-08-11 19:54 ` Lennart Borgman (gmail) [not found] ` <mailman.16401.1218484505.18990.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 11+ messages in thread From: Lennart Borgman (gmail) @ 2008-08-11 19:54 UTC (permalink / raw) To: Xah; +Cc: help-gnu-emacs Xah wrote: > ; setting the PC keyboard's various keys to Super or Hyper > (setq w32-pass-lwindow-to-system nil > w32-pass-rwindow-to-system nil > w32-pass-apps-to-system nil > w32-lwindow-modifier 'super ;; Left Windows key > w32-rwindow-modifier 'super ;; Right Windows key > w32-apps-modifier 'hyper) ;; Menu key Please note that using lwindow/rwindow like this does not work for all key sequences unless you are using the patched Emacs+EmacsW32. ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <mailman.16401.1218484505.18990.help-gnu-emacs@gnu.org>]
* Re: Behavior of M-x and A-x [not found] ` <mailman.16401.1218484505.18990.help-gnu-emacs@gnu.org> @ 2008-08-12 0:11 ` B. T. Raven 2008-08-12 1:03 ` Lennart Borgman (gmail) [not found] ` <mailman.16431.1218502993.18990.help-gnu-emacs@gnu.org> 2008-08-12 7:33 ` Xah 1 sibling, 2 replies; 11+ messages in thread From: B. T. Raven @ 2008-08-12 0:11 UTC (permalink / raw) To: help-gnu-emacs Lennart Borgman (gmail) wrote: > Xah wrote: >> ; setting the PC keyboard's various keys to Super or Hyper >> (setq w32-pass-lwindow-to-system nil >> w32-pass-rwindow-to-system nil >> w32-pass-apps-to-system nil >> w32-lwindow-modifier 'super ;; Left Windows key >> w32-rwindow-modifier 'super ;; Right Windows key >> w32-apps-modifier 'hyper) ;; Menu key > > > Please note that using lwindow/rwindow like this does not work for all > key sequences unless you are using the patched Emacs+EmacsW32. > > Could you give me an example of this, Lennart. I use Keytweak (and rearranged keycaps for Dvorak and a bilaterally symmetrical modifier key layout [bottom row: super alt ctl spacebar ctl alt super hyper] and I haven't run into any problems with it yet. I am not using EmacsW32 although I have had it installed in the past. The only things that get through from the OS when I'm in Emacs are Alt-Tab and Ctl-Alt-Delete. Ed ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Behavior of M-x and A-x 2008-08-12 0:11 ` B. T. Raven @ 2008-08-12 1:03 ` Lennart Borgman (gmail) [not found] ` <mailman.16431.1218502993.18990.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 11+ messages in thread From: Lennart Borgman (gmail) @ 2008-08-12 1:03 UTC (permalink / raw) Cc: help-gnu-emacs B. T. Raven wrote: > Lennart Borgman (gmail) wrote: >> Xah wrote: >>> ; setting the PC keyboard's various keys to Super or Hyper >>> (setq w32-pass-lwindow-to-system nil >>> w32-pass-rwindow-to-system nil >>> w32-pass-apps-to-system nil >>> w32-lwindow-modifier 'super ;; Left Windows key >>> w32-rwindow-modifier 'super ;; Right Windows key >>> w32-apps-modifier 'hyper) ;; Menu key >> >> >> Please note that using lwindow/rwindow like this does not work for all >> key sequences unless you are using the patched Emacs+EmacsW32. >> >> > > Could you give me an example of this, Lennart. I use Keytweak (and > rearranged keycaps for Dvorak and a bilaterally symmetrical modifier key > layout [bottom row: super alt ctl spacebar ctl alt super hyper] and I > haven't run into any problems with it yet. I am not using EmacsW32 > although I have had it installed in the past. The only things that get > through from the OS when I'm in Emacs are Alt-Tab and Ctl-Alt-Delete. I do not remember very well any longer since I use the patched version where this can not happen (if you tell Emacs to protect you from it). However it could happen with any of those lwindow/rwindow combinations that MS Window uses. I know I first noticed it with lwindow-e. Though it might depend on other things too. The only thing I know is that it is not guaranteed to work at all if you are not using the patches I have in Emacs+EmacsW32. (I mean accordning to the specs from MS.) If you want to know more then look at MS for LowLevelKeyboardProc. That is why I have those patches. And by the way those part of the patches does not change Emacs way of workin in any other way. They work on a lower level that the rest of Emacs does not see. If I remember correctly now there is however no guaranteed way at all to stop Alt-Tab and Ctl-Alt-Delete from working. ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <mailman.16431.1218502993.18990.help-gnu-emacs@gnu.org>]
* Re: Behavior of M-x and A-x [not found] ` <mailman.16431.1218502993.18990.help-gnu-emacs@gnu.org> @ 2008-08-12 16:54 ` B. T. Raven 0 siblings, 0 replies; 11+ messages in thread From: B. T. Raven @ 2008-08-12 16:54 UTC (permalink / raw) To: help-gnu-emacs Lennart Borgman (gmail) wrote: > B. T. Raven wrote: >> Lennart Borgman (gmail) wrote: >>> Xah wrote: >>>> ; setting the PC keyboard's various keys to Super or Hyper >>>> (setq w32-pass-lwindow-to-system nil >>>> w32-pass-rwindow-to-system nil >>>> w32-pass-apps-to-system nil >>>> w32-lwindow-modifier 'super ;; Left Windows key >>>> w32-rwindow-modifier 'super ;; Right Windows key >>>> w32-apps-modifier 'hyper) ;; Menu key >>> >>> >>> Please note that using lwindow/rwindow like this does not work for >>> all key sequences unless you are using the patched Emacs+EmacsW32. >>> >>> >> >> Could you give me an example of this, Lennart. I use Keytweak (and >> rearranged keycaps for Dvorak and a bilaterally symmetrical modifier >> key layout [bottom row: super alt ctl spacebar ctl alt super hyper] >> and I haven't run into any problems with it yet. I am not using >> EmacsW32 although I have had it installed in the past. The only things >> that get through from the OS when I'm in Emacs are Alt-Tab and >> Ctl-Alt-Delete. > > > I do not remember very well any longer since I use the patched version > where this can not happen (if you tell Emacs to protect you from it). > However it could happen with any of those lwindow/rwindow combinations > that MS Window uses. I know I first noticed it with lwindow-e. > > Though it might depend on other things too. The only thing I know is > that it is not guaranteed to work at all if you are not using the > patches I have in Emacs+EmacsW32. (I mean accordning to the specs from MS.) > > If you want to know more then look at MS for LowLevelKeyboardProc. > > That is why I have those patches. And by the way those part of the > patches does not change Emacs way of workin in any other way. They work > on a lower level that the rest of Emacs does not see. > > If I remember correctly now there is however no guaranteed way at all to > stop Alt-Tab and Ctl-Alt-Delete from working. Thanks again. Besides S-e, S- r,f,m, and d, both right and left, also raise the OS. That should be easy to remember. Since I don't want to bother disabling those keychords I will make a virtue of necessity and consider the behavior to be a feature rather than a bug. These reserved keys almost make a mnemonic: R(T)FM, DummEe ;-) Ed ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Behavior of M-x and A-x [not found] ` <mailman.16401.1218484505.18990.help-gnu-emacs@gnu.org> 2008-08-12 0:11 ` B. T. Raven @ 2008-08-12 7:33 ` Xah 2008-08-12 12:13 ` Lennart Borgman (gmail) [not found] ` <mailman.16444.1218543201.18990.help-gnu-emacs@gnu.org> 1 sibling, 2 replies; 11+ messages in thread From: Xah @ 2008-08-12 7:33 UTC (permalink / raw) To: help-gnu-emacs Xah wrote: > ; setting the PC keyboard's various keys to Super or Hyper > (setq w32-pass-lwindow-to-system nil > w32-pass-rwindow-to-system nil > w32-pass-apps-to-system nil > w32-lwindow-modifier 'super ;; Left Windows key > w32-rwindow-modifier 'super ;; Right Windows key > w32-apps-modifier 'hyper) ;; Menu key Lennart Borgman wrote: > Please note that using lwindow/rwindow like this does not work for all > key sequences unless you are using the patched Emacs+EmacsW32. What is the proper way to set it on Windows? btw, i got those code from somewhere i don't remember. Now looking at the w32 prefix, it's prob from your page. Thanks. Xah ∑ http://xahlee.org/ ☄ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Behavior of M-x and A-x 2008-08-12 7:33 ` Xah @ 2008-08-12 12:13 ` Lennart Borgman (gmail) [not found] ` <mailman.16444.1218543201.18990.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 11+ messages in thread From: Lennart Borgman (gmail) @ 2008-08-12 12:13 UTC (permalink / raw) To: Xah; +Cc: help-gnu-emacs Xah wrote: > Xah wrote: >> ; setting the PC keyboard's various keys to Super or Hyper >> (setq w32-pass-lwindow-to-system nil >> w32-pass-rwindow-to-system nil >> w32-pass-apps-to-system nil >> w32-lwindow-modifier 'super ;; Left Windows key >> w32-rwindow-modifier 'super ;; Right Windows key >> w32-apps-modifier 'hyper) ;; Menu key > > Lennart Borgman wrote: > >> Please note that using lwindow/rwindow like this does not work for all >> key sequences unless you are using the patched Emacs+EmacsW32. > > What is the proper way to set it on Windows? The only thing that the patched version really offers in this regards is the possibility to actually avoid sending lwindow etc to the system: LRESULT CALLBACK LowLevelKeyboardProc(INT nCode, WPARAM wParam, LPARAM lParam) { ... case VK_LWIN: { bHandle = NILP(Vw32_pass_lwindow_to_system); break; } case VK_RWIN: { bHandle = NILP(Vw32_pass_rwindow_to_system); break; } case VK_CAPITAL: { bHandle = NILP(Vw32_enable_caps_lock); break; } case VK_NUMLOCK: { bHandle = NILP(Vw32_enable_num_lock); break; } case VK_MENU: case VK_LMENU: case VK_RMENU: { bHandle = NILP(Vw32_pass_alt_to_system); break; } if (bHandle) { // Just to be sure check we are in the right thread if (GetCurrentThreadId() == dwWindowsThreadId) { // Do we have keyboard focus? HWND hwnd = GetFocus(); if (0 != hwnd) { SendMessage (hwnd, msg, wParamMsg, lParamMsg); return TRUE; } } } } HHOOK hhook; return CallNextHookEx(hhook, nCode, wParam, lParam); } And then it also offers easy way to set things up up, see w32-meta.el that comes with the patched Emacs+EmacsW32. ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <mailman.16444.1218543201.18990.help-gnu-emacs@gnu.org>]
* Emacsw32 website suggestion [Re: Behavior of M-x and A-x] [not found] ` <mailman.16444.1218543201.18990.help-gnu-emacs@gnu.org> @ 2008-08-12 13:06 ` Xah 2008-08-12 14:08 ` Lennart Borgman (gmail) [not found] ` <mailman.16448.1218550117.18990.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 11+ messages in thread From: Xah @ 2008-08-12 13:06 UTC (permalink / raw) To: help-gnu-emacs On Aug 12, 5:13 am, "Lennart Borgman (gmail)" <lennart.borg...@gmail.com> wrote: > Xahwrote: > >Xahwrote: > >> ; setting the PC keyboard's various keys to Super or Hyper > >> (setq w32-pass-lwindow-to-system nil > >> w32-pass-rwindow-to-system nil > >> w32-pass-apps-to-system nil > >> w32-lwindow-modifier 'super ;; Left Windows key > >> w32-rwindow-modifier 'super ;; Right Windows key > >> w32-apps-modifier 'hyper) ;; Menu key > > > Lennart Borgman wrote: > > >> Please note that using lwindow/rwindow like this does not work for all > >> key sequences unless you are using the patched Emacs+EmacsW32. > > > What is the proper way to set it on Windows? > > The only thing that the patched version really offers in this regards is > the possibility to actually avoid sending lwindow etc to the system: > > LRESULT > CALLBACK > LowLevelKeyboardProc(INT nCode, WPARAM wParam, LPARAM lParam) > { > ... > case VK_LWIN: > { > bHandle = NILP(Vw32_pass_lwindow_to_system); > break; > } > case VK_RWIN: > { > bHandle = NILP(Vw32_pass_rwindow_to_system); > break; > } > case VK_CAPITAL: > { > bHandle = NILP(Vw32_enable_caps_lock); > break; > } > case VK_NUMLOCK: > { > bHandle = NILP(Vw32_enable_num_lock); > break; > } > case VK_MENU: > case VK_LMENU: > case VK_RMENU: > { > bHandle = NILP(Vw32_pass_alt_to_system); > break; > } > if (bHandle) { > // Just to be sure check we are in the right thread > if (GetCurrentThreadId() == dwWindowsThreadId) { > // Do we have keyboard focus? > HWND hwnd = GetFocus(); > if (0 != hwnd) { > SendMessage (hwnd, msg, wParamMsg, lParamMsg); > return TRUE; > } > } > } > } > HHOOK hhook; return CallNextHookEx(hhook, nCode, wParam, lParam); > > } > > And then it also offers easy way to set things up up, see w32-meta.el > that comes with the patched Emacs+EmacsW32. Thanks. Quite complicated i don't understand. That seems c source. ------------- there's some suggestion about your emacsw32 site. • drop the name to just EmacsW32. As opposed to Emacs+EmacsW32. for those who needs to know the distinction, they can trivially find out by clicking a link. • redo the entry page so it's simply a site for EmacsW32, as a pre- compiled emacs distro for MS Windows. With this message simple. Then links to separate pages about features, source code, explanation of patch, on reason to use, change log, etc. The point is that, when user goes to your site, http://ourcomments.org/Emacs/EmacsW32.html she can immediately get the idea that this is a pre-compiled emacs distro for Windows with ease to use in mind. Then, she can click on the big download button to try it out. If she's a tech geeker, she can easily check whether there's patch she can dowload, or other info. Aquamac or Carbon Emacs' website are good examples of this approach. • Put the author name in the front page. Unless for some personal reason, you intentionally don't want people to know who made it, it should have author name. Xah ∑ http://xahlee.org/ ☄ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Emacsw32 website suggestion [Re: Behavior of M-x and A-x] 2008-08-12 13:06 ` Emacsw32 website suggestion [Re: Behavior of M-x and A-x] Xah @ 2008-08-12 14:08 ` Lennart Borgman (gmail) [not found] ` <mailman.16448.1218550117.18990.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 11+ messages in thread From: Lennart Borgman (gmail) @ 2008-08-12 14:08 UTC (permalink / raw) To: Xah; +Cc: help-gnu-emacs Xah wrote: > Thanks. Quite complicated i don't understand. That seems c source. Just look at the structure. I think you can guess what is going on from that. > there's some suggestion about your emacsw32 site. > > • drop the name to just EmacsW32. As opposed to Emacs+EmacsW32. Thanks, but I have struggled quite a bit with that one. There has been a lot of misunderstandings and because of that I prefer Emacs+EmacsW32. > • redo the entry page so it's simply a site for EmacsW32, as a pre- > compiled emacs distro for MS Windows. With this message simple. Then > links to separate pages about features, source code, explanation of > patch, on reason to use, change log, etc. You mean the page http://ourcomments.org/Emacs/Emacs.html Yes, it is out of sync so to say now. Thanks. ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <mailman.16448.1218550117.18990.help-gnu-emacs@gnu.org>]
* Re: Emacsw32 website suggestion [Re: Behavior of M-x and A-x] [not found] ` <mailman.16448.1218550117.18990.help-gnu-emacs@gnu.org> @ 2008-09-07 20:25 ` David Combs 0 siblings, 0 replies; 11+ messages in thread From: David Combs @ 2008-09-07 20:25 UTC (permalink / raw) To: help-gnu-emacs [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 3113 bytes --] In article <mailman.16448.1218550117.18990.help-gnu-emacs@gnu.org>, Lennart Borgman (gmail) <lennart.borgman@gmail.com> wrote: >Xah wrote: >> Thanks. Quite complicated i don't understand. That seems c source. > >Just look at the structure. I think you can guess what is going on from >that. > >> there's some suggestion about your emacsw32 site. >> >> ⢠drop the name to just EmacsW32. As opposed to Emacs+EmacsW32. > >Thanks, but I have struggled quite a bit with that one. There has been a >lot of misunderstandings and because of that I prefer Emacs+EmacsW32. > >> ⢠redo the entry page so it's simply a site for EmacsW32, as a pre- >> compiled emacs distro for MS Windows. With this message simple. Then >> links to separate pages about features, source code, explanation of >> patch, on reason to use, change log, etc. > >You mean the page > > http://ourcomments.org/Emacs/Emacs.html > >Yes, it is out of sync so to say now. Thanks. > > > ------- and on sunday, 7sept08: The point is that, when user goes to your site, http://ourcomments.org/Emacs/EmacsW32.html she can immediately get the idea that this is a pre-compiled emacs distro for Windows with ease to use in mind. Then, she can click on the big download button to try it out. If she's a tech geeker, she can easily check whether there's patch she can dowload, or other info. [Need updating? re http://ourcomments.org/Emacs/EmacsW32.html: HTTP/1.1 200 OK Date: Sun, 07 Sep 2008 20:16:57 GMT Content-Type: text/html Connection: close Server: Apache Last-Modified: Tue, 03 Jun 2008 21:16:24 GMT ETag: "2496a8a-c7b4-4845b4a8" Content-Length: 51124 ] Aquamac or Carbon Emacs' website are good examples of this approach. nu.emacs.help #166768 (548 + 237 more) From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> [2] Re: Emacsw32 website suggestion [Re: Behavior of M-x and A-x] Date: Tue Aug 12 10:08:25 EDT 2008 Lines: 26 Xah wrote: > Thanks. Quite complicated i don't understand. That seems c source. Just look at the structure. I think you can guess what is going on from that. > there's some suggestion about your emacsw32 site. > > â^@¢ drop the name to just EmacsW32. As opposed to Emacs+EmacsW32. Thanks, but I have struggled quite a bit with that one. There has been a lot of misunderstandings and because of that I prefer Emacs+EmacsW32. > â^@¢ redo the entry page so it's simply a site for EmacsW32, as a pre- > compiled emacs distro for MS Windows. With this message simple. Then > links to separate pages about features, source code, explanation of > patch, on reason to use, change log, etc. You mean the page http://ourcomments.org/Emacs/Emacs.html Yes, it is out of sync so to say now. Thanks. [Yes indeed: re: http://ourcomments.org/Emacs/Emacs.html HTTP/1.1 200 OK Date: Sun, 07 Sep 2008 20:19:28 GMT Content-Type: text/html Connection: close Server: Apache Last-Modified: Thu, 17 May 2007 02:50:08 GMT ETag: "6d6959-1e69-464bc2e0" Content-Length: 7785 ] That is, are these things ok to use, or do you still have some things that NEED (BADLY NEED) to be done? Thanks, David ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-09-07 20:25 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-08-11 17:48 Behavior of M-x and A-x Peter Weiss 2008-08-11 19:21 ` Xah 2008-08-11 19:54 ` Lennart Borgman (gmail) [not found] ` <mailman.16401.1218484505.18990.help-gnu-emacs@gnu.org> 2008-08-12 0:11 ` B. T. Raven 2008-08-12 1:03 ` Lennart Borgman (gmail) [not found] ` <mailman.16431.1218502993.18990.help-gnu-emacs@gnu.org> 2008-08-12 16:54 ` B. T. Raven 2008-08-12 7:33 ` Xah 2008-08-12 12:13 ` Lennart Borgman (gmail) [not found] ` <mailman.16444.1218543201.18990.help-gnu-emacs@gnu.org> 2008-08-12 13:06 ` Emacsw32 website suggestion [Re: Behavior of M-x and A-x] Xah 2008-08-12 14:08 ` Lennart Borgman (gmail) [not found] ` <mailman.16448.1218550117.18990.help-gnu-emacs@gnu.org> 2008-09-07 20:25 ` David Combs
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).