* Consult some suggestions for adjusting keyboard shortcuts to bind conflicts. @ 2021-04-07 1:39 Hongyi Zhao 2021-04-08 7:06 ` Robert Thorpe 2021-04-10 14:26 ` Gregory Heytings 0 siblings, 2 replies; 12+ messages in thread From: Hongyi Zhao @ 2021-04-07 1:39 UTC (permalink / raw) To: help-gnu-emacs On Ubuntu 20.04, I use fcitx input framework, which use Ctr + SPC to trigger input method and Saladict which use Alt + s to call its standalone panel. But all the above key bindings have been predefined in Emacs. Could you please give me some suggestions on adjusting keyboard shortcuts to avoid binding conflicts? Regards -- Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com> Theory and Simulation of Materials Hebei Polytechnic University of Science and Technology engineering NO. 552 North Gangtie Road, Xingtai, China ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Consult some suggestions for adjusting keyboard shortcuts to bind conflicts. 2021-04-07 1:39 Consult some suggestions for adjusting keyboard shortcuts to bind conflicts Hongyi Zhao @ 2021-04-08 7:06 ` Robert Thorpe 2021-04-10 13:40 ` Hongyi Zhao 2021-04-10 14:26 ` Gregory Heytings 1 sibling, 1 reply; 12+ messages in thread From: Robert Thorpe @ 2021-04-08 7:06 UTC (permalink / raw) To: Hongyi Zhao; +Cc: help-gnu-emacs Hongyi Zhao <hongyi.zhao@gmail.com> writes: > On Ubuntu 20.04, I use fcitx input framework, which use Ctr + SPC to > trigger input method and Saladict which use Alt + s to call its > standalone panel. > > But all the above key bindings have been predefined in Emacs. Could > you please give me some suggestions on adjusting keyboard shortcuts to > avoid binding conflicts? I'm not sure which way around you want to deal with the problem. I'm presuming you want to move the mappings in Emacs that Emacs uses for C-SPC and M-s. Do you use Emacs in the terminal? If you don't then things are more flexible. For example, you could use C-:, C-, C-', C-= or C-+. You could also map a super or hyper key in Emacs. BR, Robert Thorpe ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Consult some suggestions for adjusting keyboard shortcuts to bind conflicts. 2021-04-08 7:06 ` Robert Thorpe @ 2021-04-10 13:40 ` Hongyi Zhao 2021-04-11 20:16 ` Nikolay Kudryavtsev 2021-04-13 22:23 ` Robert Thorpe 0 siblings, 2 replies; 12+ messages in thread From: Hongyi Zhao @ 2021-04-10 13:40 UTC (permalink / raw) To: Robert Thorpe; +Cc: help-gnu-emacs On Thu, Apr 8, 2021 at 3:07 PM Robert Thorpe <rt@robertthorpeconsulting.com> wrote: > > Hongyi Zhao <hongyi.zhao@gmail.com> writes: > > > On Ubuntu 20.04, I use fcitx input framework, which use Ctr + SPC to > > trigger input method and Saladict which use Alt + s to call its > > standalone panel. > > > > But all the above key bindings have been predefined in Emacs. Could > > you please give me some suggestions on adjusting keyboard shortcuts to > > avoid binding conflicts? > > I'm not sure which way around you want to deal with the problem. > > I'm presuming you want to move the mappings in Emacs that Emacs uses for > C-SPC and M-s. Or some suggestions to keep the Emacs key bindings as they are, but instead, resolve conflicting by changing the other applications' predefined key bindings. > Do you use Emacs in the terminal? May or may not. > If you don't then things are > more flexible. For example, you could use C-:, C-, C-', C-= or C-+. > You could also map a super or hyper key in Emacs. > > BR, > Robert Thorpe -- Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com> Theory and Simulation of Materials Hebei Polytechnic University of Science and Technology engineering NO. 552 North Gangtie Road, Xingtai, China ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Consult some suggestions for adjusting keyboard shortcuts to bind conflicts. 2021-04-10 13:40 ` Hongyi Zhao @ 2021-04-11 20:16 ` Nikolay Kudryavtsev 2021-04-12 6:19 ` Hongyi Zhao 2021-04-13 22:23 ` Robert Thorpe 1 sibling, 1 reply; 12+ messages in thread From: Nikolay Kudryavtsev @ 2021-04-11 20:16 UTC (permalink / raw) To: Hongyi Zhao; +Cc: help-gnu-emacs Well, do you use M-s prefix commands? I seldom do, so I've rebound them to another prefix and use M-s for window switching instead. As for running Emacs with multiple input systems, my usual setup is setting up the OS to switch input language on Caps Lock and Ctrl+Shift, since neither of those keys mess with Emacs in any way and I seldom need Caps Lock. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Consult some suggestions for adjusting keyboard shortcuts to bind conflicts. 2021-04-11 20:16 ` Nikolay Kudryavtsev @ 2021-04-12 6:19 ` Hongyi Zhao 2021-04-12 7:59 ` tomas 0 siblings, 1 reply; 12+ messages in thread From: Hongyi Zhao @ 2021-04-12 6:19 UTC (permalink / raw) To: Nikolay Kudryavtsev; +Cc: help-gnu-emacs On Mon, Apr 12, 2021 at 4:16 AM Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com> wrote: > > Well, do you use M-s prefix commands? I seldom do, so I've rebound them > to another prefix and use M-s for window switching instead. > > As for running Emacs with multiple input systems, my usual setup is > setting up the OS to switch input language on Caps Lock and Ctrl+Shift, > since neither of those keys mess with Emacs in any way and I seldom need > Caps Lock. Caps Lock in itself will (de)activate the capital character input mode, so, I think maybe Ctrl+Shift is more preferable. Regards -- Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com> Theory and Simulation of Materials Hebei Polytechnic University of Science and Technology engineering NO. 552 North Gangtie Road, Xingtai, China ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Consult some suggestions for adjusting keyboard shortcuts to bind conflicts. 2021-04-12 6:19 ` Hongyi Zhao @ 2021-04-12 7:59 ` tomas 2021-04-12 9:06 ` Hongyi Zhao 0 siblings, 1 reply; 12+ messages in thread From: tomas @ 2021-04-12 7:59 UTC (permalink / raw) To: Hongyi Zhao; +Cc: help-gnu-emacs, Nikolay Kudryavtsev [-- Attachment #1: Type: text/plain, Size: 1316 bytes --] On Mon, Apr 12, 2021 at 02:19:07PM +0800, Hongyi Zhao wrote: > On Mon, Apr 12, 2021 at 4:16 AM Nikolay Kudryavtsev > <nikolay.kudryavtsev@gmail.com> wrote: > > > > Well, do you use M-s prefix commands? I seldom do, so I've rebound them > > to another prefix and use M-s for window switching instead. > > > > As for running Emacs with multiple input systems, my usual setup is > > setting up the OS to switch input language on Caps Lock and Ctrl+Shift, > > since neither of those keys mess with Emacs in any way and I seldom need > > Caps Lock. > > Caps Lock in itself will (de)activate the capital character input > mode, so, I think maybe Ctrl+Shift is more preferable. I'm another of those re-using Caps Lock for something different. In my case, I use double-shift (i.e. left-shift + right-shift) to switch language, and caps lock for Compose (I ♥ compose: very handy :) See, I'm an old guy: my fingers were trained on a mechanical typewriter, and there caps-lock kind of made sense; since "shift" had to push the whole type cluster around, it was hard to keep shift pushed with the pinky while typing a couple of letters. Since computer keyboards, I realised that I had no use for caps lock (except for pushing it accidentaly while entering passwords, that is ;-) Cheers - t [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Consult some suggestions for adjusting keyboard shortcuts to bind conflicts. 2021-04-12 7:59 ` tomas @ 2021-04-12 9:06 ` Hongyi Zhao 2021-04-12 9:22 ` tomas 0 siblings, 1 reply; 12+ messages in thread From: Hongyi Zhao @ 2021-04-12 9:06 UTC (permalink / raw) To: tomas; +Cc: help-gnu-emacs, Nikolay Kudryavtsev On Mon, Apr 12, 2021 at 3:59 PM <tomas@tuxteam.de> wrote: > > On Mon, Apr 12, 2021 at 02:19:07PM +0800, Hongyi Zhao wrote: > > On Mon, Apr 12, 2021 at 4:16 AM Nikolay Kudryavtsev > > <nikolay.kudryavtsev@gmail.com> wrote: > > > > > > Well, do you use M-s prefix commands? I seldom do, so I've rebound them > > > to another prefix and use M-s for window switching instead. > > > > > > As for running Emacs with multiple input systems, my usual setup is > > > setting up the OS to switch input language on Caps Lock and Ctrl+Shift, > > > since neither of those keys mess with Emacs in any way and I seldom need > > > Caps Lock. > > > > Caps Lock in itself will (de)activate the capital character input > > mode, so, I think maybe Ctrl+Shift is more preferable. > > I'm another of those re-using Caps Lock for something different. In > my case, I use double-shift (i.e. left-shift + right-shift) to switch > language, and caps lock for Compose (I ♥ compose: very handy :) What do you mean by saying "compose"? > See, I'm an old guy: my fingers were trained on a mechanical typewriter, > and there caps-lock kind of made sense; since "shift" had to push the > whole type cluster around, it was hard to keep shift pushed with the > pinky while typing a couple of letters. > > Since computer keyboards, I realised that I had no use for caps lock > (except for pushing it accidentaly while entering passwords, that > is ;-) > > Cheers > - t -- Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com> Theory and Simulation of Materials Hebei Polytechnic University of Science and Technology engineering NO. 552 North Gangtie Road, Xingtai, China ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Consult some suggestions for adjusting keyboard shortcuts to bind conflicts. 2021-04-12 9:06 ` Hongyi Zhao @ 2021-04-12 9:22 ` tomas 0 siblings, 0 replies; 12+ messages in thread From: tomas @ 2021-04-12 9:22 UTC (permalink / raw) To: Hongyi Zhao; +Cc: help-gnu-emacs, Nikolay Kudryavtsev [-- Attachment #1: Type: text/plain, Size: 2901 bytes --] On Mon, Apr 12, 2021 at 05:06:22PM +0800, Hongyi Zhao wrote: > On Mon, Apr 12, 2021 at 3:59 PM <tomas@tuxteam.de> wrote: > > > > On Mon, Apr 12, 2021 at 02:19:07PM +0800, Hongyi Zhao wrote: > > > On Mon, Apr 12, 2021 at 4:16 AM Nikolay Kudryavtsev > > > <nikolay.kudryavtsev@gmail.com> wrote: > > > > > > > > Well, do you use M-s prefix commands? I seldom do, so I've rebound them > > > > to another prefix and use M-s for window switching instead. > > > > > > > > As for running Emacs with multiple input systems, my usual setup is > > > > setting up the OS to switch input language on Caps Lock and Ctrl+Shift, > > > > since neither of those keys mess with Emacs in any way and I seldom need > > > > Caps Lock. > > > > > > Caps Lock in itself will (de)activate the capital character input > > > mode, so, I think maybe Ctrl+Shift is more preferable. > > > > I'm another of those re-using Caps Lock for something different. In > > my case, I use double-shift (i.e. left-shift + right-shift) to switch > > language, and caps lock for Compose (I ♥ compose: very handy :) > > What do you mean by saying "compose"? The "Compose" key allows you to combine several keystrokes to enter other code points. You type [COMPOSE] plus two or more keystrokes. While there were some keyboards having an explicit Compose key, most keyboards these days are some variation on some IBM PC theme, lacking a Compose. In X, there is a way to define your own "Compose" sequences, and it is possible to redefine nearly everything. I remap my Compose key to Caps Lock in my ~/.xsessionrc like so: setxkbmap -model pc105 \ -layout "de,el" \ -variant "deadtilde," \ -option "compose:caps" \ -option "altwin:alt_super_win" \ -option "terminate:ctrl_alt_bksp" \ -option "grp:shifts_toggle" The line "-option "compose:caps" does this trick. There are many pre-defined compose sequences (in a typical Debian GNU/Linux installation somewhere around /usr/share/X11/locale/*/Compose), allowing me to do useful things like [COMPOSE] + , + c => ç [COMPOSE] + " + e => ë [COMPOSE] + U + g => ğ and less useful, but still funny things like [COMPOSE] + < + 3 => ♥ As you see, most of the time the combinations try to leverage optical similarities to make them easier to remember. I can augment this list by having an ~/.XCompose -- mine adds a few: include "%L" <Multi_key> <equal> <greater> : "⇒" <Multi_key> <less> <equal> : "⇐" <Multi_key> <asterisk> <0> : "☀" <Multi_key> <asterisk> <o> : "☼" <Multi_key> <o> <plus> : "♀" <Multi_key> <o> <greater> : "♂" <Multi_key> <plus> <o> <greater> : "⚥" The "include %L" means "include whatever the current locale has as default, "Multi_key" is just the Xish name for compose. Cheers - t [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Consult some suggestions for adjusting keyboard shortcuts to bind conflicts. 2021-04-10 13:40 ` Hongyi Zhao 2021-04-11 20:16 ` Nikolay Kudryavtsev @ 2021-04-13 22:23 ` Robert Thorpe 2021-04-14 0:31 ` Hongyi Zhao 1 sibling, 1 reply; 12+ messages in thread From: Robert Thorpe @ 2021-04-13 22:23 UTC (permalink / raw) To: Hongyi Zhao; +Cc: help-gnu-emacs Hongyi Zhao <hongyi.zhao@gmail.com> writes: > On Thu, Apr 8, 2021 at 3:07 PM Robert Thorpe > <rt@robertthorpeconsulting.com> wrote: >> >> Hongyi Zhao <hongyi.zhao@gmail.com> writes: >> >> > On Ubuntu 20.04, I use fcitx input framework, which use Ctr + SPC to >> > trigger input method and Saladict which use Alt + s to call its >> > standalone panel. >> > >> > But all the above key bindings have been predefined in Emacs. Could >> > you please give me some suggestions on adjusting keyboard shortcuts to >> > avoid binding conflicts? >> >> I'm not sure which way around you want to deal with the problem. >> >> I'm presuming you want to move the mappings in Emacs that Emacs uses for >> C-SPC and M-s. > > Or some suggestions to keep the Emacs key bindings as they are, but > instead, resolve conflicting by changing the other applications' > predefined key bindings. > >> Do you use Emacs in the terminal? > > May or may not. In that case I also think the keys I mentioned are the best. Those are * C-; * C-, * C-' * C-= * C-+ Here is why.... Those keys don't work on terminal emulators, at least not without significant configuration of the emulator. So, not only does Emacs not use them, it's unlikely that the Emacs developers will start using them for new features. For example you could map C-; to switch windows in your windowing system and map C-, to your input method program. Another poster mentioned the possibility of using both shift keys pressed together. I think that's a good idea too since Emacs doesn't use the binding or differentiate between left and right shift. (Not by default, I think it can). Someone also mentioned the possibility of repurposing M-s. Now I agree that there isn't that much useful on M-s. Personally I use occur (M-s o) and isearch-forward-symbol (M-s _). But remember that other things could be added in the future and you'd be missing out on them. Of course, you could move the M-s keymap elsewhere so you can retain those features but that's extra work. BR, Robert Thorpe ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Consult some suggestions for adjusting keyboard shortcuts to bind conflicts. 2021-04-13 22:23 ` Robert Thorpe @ 2021-04-14 0:31 ` Hongyi Zhao 0 siblings, 0 replies; 12+ messages in thread From: Hongyi Zhao @ 2021-04-14 0:31 UTC (permalink / raw) To: Robert Thorpe; +Cc: help-gnu-emacs On Wed, Apr 14, 2021 at 6:24 AM Robert Thorpe <rt@robertthorpeconsulting.com> wrote: > > Hongyi Zhao <hongyi.zhao@gmail.com> writes: > > > On Thu, Apr 8, 2021 at 3:07 PM Robert Thorpe > > <rt@robertthorpeconsulting.com> wrote: > >> > >> Hongyi Zhao <hongyi.zhao@gmail.com> writes: > >> > >> > On Ubuntu 20.04, I use fcitx input framework, which use Ctr + SPC to > >> > trigger input method and Saladict which use Alt + s to call its > >> > standalone panel. > >> > > >> > But all the above key bindings have been predefined in Emacs. Could > >> > you please give me some suggestions on adjusting keyboard shortcuts to > >> > avoid binding conflicts? > >> > >> I'm not sure which way around you want to deal with the problem. > >> > >> I'm presuming you want to move the mappings in Emacs that Emacs uses for > >> C-SPC and M-s. > > > > Or some suggestions to keep the Emacs key bindings as they are, but > > instead, resolve conflicting by changing the other applications' > > predefined key bindings. > > > >> Do you use Emacs in the terminal? > > > > May or may not. > > In that case I also think the keys I mentioned are the best. Those are > * C-; > * C-, > * C-' > * C-= > * C-+ > > Here is why.... Those keys don't work on terminal emulators, at least > not without significant configuration of the emulator. So, not only > does Emacs not use them, it's unlikely that the Emacs developers will > start using them for new features. > > For example you could map C-; to switch windows in your windowing system > and map C-, to your input method program. > > Another poster mentioned the possibility of using both shift keys > pressed together. I think that's a good idea too since Emacs doesn't > use the binding or differentiate between left and right shift. (Not by > default, I think it can). > > Someone also mentioned the possibility of repurposing M-s. Now I agree > that there isn't that much useful on M-s. Personally I use occur (M-s > o) and isearch-forward-symbol (M-s _). But remember that other things > could be added in the future and you'd be missing out on them. Of > course, you could move the M-s keymap elsewhere so you can retain those > features but that's extra work. Thank you very much for your valuable notes. > BR, > Robert Thorpe -- Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com> Theory and Simulation of Materials Hebei Polytechnic University of Science and Technology engineering NO. 552 North Gangtie Road, Xingtai, China ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Consult some suggestions for adjusting keyboard shortcuts to bind conflicts. 2021-04-07 1:39 Consult some suggestions for adjusting keyboard shortcuts to bind conflicts Hongyi Zhao 2021-04-08 7:06 ` Robert Thorpe @ 2021-04-10 14:26 ` Gregory Heytings 2021-04-11 0:22 ` Hongyi Zhao 1 sibling, 1 reply; 12+ messages in thread From: Gregory Heytings @ 2021-04-10 14:26 UTC (permalink / raw) To: Hongyi Zhao; +Cc: help-gnu-emacs > > On Ubuntu 20.04, I use fcitx input framework, which use Ctr + SPC to > trigger input method and Saladict which use Alt + s to call its > standalone panel. > In general, it's not a good idea to use other programs when you use Emacs. Your operating system should be a bootloader for Emacs. ;-) Joking aside: > > But all the above key bindings have been predefined in Emacs. Could you > please give me some suggestions on adjusting keyboard shortcuts to avoid > binding conflicts? > That depends on your preferences. Either you want/can change the bindings used by other programs, or you change the bindings used by Emacs. If the choose the former, the problem is that Emacs puts commands on almost all keys. You can however safely use the function keys: F5 to F9 will by convention never be predefined by Emacs, the commands on F1 to F4 are available elsewhere, and F9 and F12 are AFAIK not used by Emacs. F10 and F11 are used by Emacs however, and their commands are not available elsewhere by default. If you choose the latter, you have the same problem: you have to move the commands to some free key, and there aren't many, especially if you want to use the same bindings in a terminal. But you can also safely use the functions keys, and the C-c LETTER bindings, which are by convention reserved for users. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Consult some suggestions for adjusting keyboard shortcuts to bind conflicts. 2021-04-10 14:26 ` Gregory Heytings @ 2021-04-11 0:22 ` Hongyi Zhao 0 siblings, 0 replies; 12+ messages in thread From: Hongyi Zhao @ 2021-04-11 0:22 UTC (permalink / raw) To: Gregory Heytings; +Cc: help-gnu-emacs On Sat, Apr 10, 2021 at 10:26 PM Gregory Heytings <gregory@heytings.org> wrote: > > > > > > On Ubuntu 20.04, I use fcitx input framework, which use Ctr + SPC to > > trigger input method and Saladict which use Alt + s to call its > > standalone panel. > > > > In general, it's not a good idea to use other programs when you use Emacs. > Your operating system should be a bootloader for Emacs. ;-) > > Joking aside: > > > > > But all the above key bindings have been predefined in Emacs. Could you > > please give me some suggestions on adjusting keyboard shortcuts to avoid > > binding conflicts? > > > > That depends on your preferences. Either you want/can change the bindings > used by other programs, or you change the bindings used by Emacs. > > If the choose the former, the problem is that Emacs puts commands on > almost all keys. You can however safely use the function keys: F5 to F9 > will by convention never be predefined by Emacs, the commands on F1 to F4 > are available elsewhere, and F9 and F12 are AFAIK not used by Emacs. F10 > and F11 are used by Emacs however, and their commands are not available > elsewhere by default. > > If you choose the latter, you have the same problem: you have to move the > commands to some free key, and there aren't many, especially if you want > to use the same bindings in a terminal. But you can also safely use the > functions keys, and the C-c LETTER bindings, which are by convention > reserved for users. For the shortcut keys of the input method, another alternative is to disable the fcitx input method, and use emaca oriented/tailed internal input method, say, this one, <https://github.com/DogLooksGood/emacs-rime>, when working within emacs>. But I don't know to disable/overwrite the external application invocation with the one defined by Emacs itself, when click on the corresponding key sequence from within Emacs. Regards -- Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com> Theory and Simulation of Materials Hebei Polytechnic University of Science and Technology engineering NO. 552 North Gangtie Road, Xingtai, China ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-04-14 0:31 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-04-07 1:39 Consult some suggestions for adjusting keyboard shortcuts to bind conflicts Hongyi Zhao 2021-04-08 7:06 ` Robert Thorpe 2021-04-10 13:40 ` Hongyi Zhao 2021-04-11 20:16 ` Nikolay Kudryavtsev 2021-04-12 6:19 ` Hongyi Zhao 2021-04-12 7:59 ` tomas 2021-04-12 9:06 ` Hongyi Zhao 2021-04-12 9:22 ` tomas 2021-04-13 22:23 ` Robert Thorpe 2021-04-14 0:31 ` Hongyi Zhao 2021-04-10 14:26 ` Gregory Heytings 2021-04-11 0:22 ` Hongyi Zhao
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).