* key function to change @ 2024-10-22 15:39 Andreas Diener via Users list for the GNU Emacs text editor 2024-10-22 17:51 ` Leo Butler 2024-10-23 1:55 ` Stefan Monnier via Users list for the GNU Emacs text editor 0 siblings, 2 replies; 3+ messages in thread From: Andreas Diener via Users list for the GNU Emacs text editor @ 2024-10-22 15:39 UTC (permalink / raw) To: help-gnu-emacs Dear Madam or Sir, first: I am from Germany and only stumbling through the english language, so please excuse this kind of literature ... Some (quite long) time ago one of you guys helped me out, and I hope I can get a hint from you again. I am on Linux (Debian 12), Emacs from the repository (28.2), and I am using a standard keyboard without num block, but a menu key on the right corner next to the Ctrl key. Since the Alt key on the left to the Space bar is the only Alt/Meta key it is quite "interesting" which grips I have to manage using the key bindings with M/Alt with the left hand. For the Ctrl key I use the hand which is not busy with letter keys, e.g. for C-x s I take the rigth Ctrl key and type the x and s with the left hand, and I think that would be nice for the M/Alt key, too. As default the menu key on the right produces the M-x prefix, but I don't need it that often, so I would like to reduce this to M only (e.g. for M-f, M-d, M-w, M > etc.). Searching the web about this there are some interesting solutions, but I didn't find a solution for my idea, additional there seem to be different ways for Emacs on different systems like Windows, MacOS and Linux. And because I am not into writing software and have no idea about lisp programming, I am a bit helpless here. An entry in my .emacs file, which I tryed, does not work: (global-set-key [menu] 'meta) Best regards, Andreas Diener ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: key function to change 2024-10-22 15:39 key function to change Andreas Diener via Users list for the GNU Emacs text editor @ 2024-10-22 17:51 ` Leo Butler 2024-10-23 1:55 ` Stefan Monnier via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 3+ messages in thread From: Leo Butler @ 2024-10-22 17:51 UTC (permalink / raw) To: Andreas Diener via Users list for the GNU Emacs text editor Cc: Andreas Diener Hello Andreas, I am a bit confused about which key you want to bind. Could you do the following in emacs: M-x shell RET (open a *shell* buffer) Type xev RET Press and let go of the key that you want to re-bind. Copy the relevant output into the body of an email and send it to us. The output should look like (I press and let go of the right-alt, then left-alt keys): KeyPress event, serial 34, synthetic NO, window 0x2a00001, root 0x50a, subw 0x0, time 110399765, (-539,815), root:(265,835), state 0x0, keycode 108 (keysym 0xffea, Alt_R), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 34, synthetic NO, window 0x2a00001, root 0x50a, subw 0x0, time 110399854, (-539,815), root:(265,835), state 0x8, keycode 108 (keysym 0xffea, Alt_R), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 34, synthetic NO, window 0x2a00001, root 0x50a, subw 0x0, time 110404181, (-539,815), root:(265,835), state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 34, synthetic NO, window 0x2a00001, root 0x50a, subw 0x0, time 110404261, (-539,815), root:(265,835), state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False Best regards, Leo On Tue, Oct 22 2024, Andreas Diener via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote: > Dear Madam or Sir, > > first: I am from Germany and only stumbling through the english > language, so please excuse this kind of literature ... > > Some (quite long) time ago one of you guys helped me out, and I hope I > can get a hint from you again. > > I am on Linux (Debian 12), Emacs from the repository (28.2), and I am > using a standard keyboard without num block, but a menu key on the > right corner next to the Ctrl key. Since the Alt key on the left to the > Space bar is the only Alt/Meta key it is quite "interesting" which > grips I have to manage using the key bindings with M/Alt with the left > hand. > For the Ctrl key I use the hand which is not busy with letter keys, > e.g. for C-x s I take the rigth Ctrl key and type the x and s with the > left hand, and I think that would be nice for the M/Alt key, too. > > As default the menu key on the right produces the M-x prefix, but I > don't need it that often, so I would like to reduce this to M only > (e.g. for M-f, M-d, M-w, M > etc.). > Searching the web about this there are some interesting solutions, but > I didn't find a solution for my idea, additional there seem to be > different ways for Emacs on different systems like Windows, MacOS and > Linux. And because I am not into writing software and have no idea > about lisp programming, I am a bit helpless here. > > An entry in my .emacs file, which I tryed, does not work: > (global-set-key [menu] 'meta) > > Best regards, > Andreas Diener -- --- Best regards, Dr Butler ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: key function to change 2024-10-22 15:39 key function to change Andreas Diener via Users list for the GNU Emacs text editor 2024-10-22 17:51 ` Leo Butler @ 2024-10-23 1:55 ` Stefan Monnier via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 3+ messages in thread From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-10-23 1:55 UTC (permalink / raw) To: help-gnu-emacs > As default the menu key on the right produces the M-x prefix, but I > don't need it that often, so I would like to reduce this to M only > (e.g. for M-f, M-d, M-w, M > etc.). The "best" way to do that is outside of Emacs (so it will affect all applications rather than only Emacs), so as to make that key behave like the same modifier as the key left of the space bar. The way to do that has changed over the years, so I don't know how it is now. I used to do this with `xmodmap` but I think nowadays you'll need something different like `xkbset` or under Wayland probably yet something else. If you want that change to affect only Emacs, you can try something like (global-set-key [menu] "\e") [ Which may need to be tweaked depending on the exact even that key sends. ] but it probably won't work quite right (even after tweaking) because it will really behave like an ESC key, so you probably won't be allowed to hit that key *together* with `f` to get `M-f`. Stefan ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-23 1:55 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-10-22 15:39 key function to change Andreas Diener via Users list for the GNU Emacs text editor 2024-10-22 17:51 ` Leo Butler 2024-10-23 1:55 ` Stefan Monnier via Users list for the GNU Emacs text editor
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.