help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Consult some suggestions for adjusting keyboard shortcuts to bind co


From: tomas
Subject: Re: Consult some suggestions for adjusting keyboard shortcuts to bind conflicts.
Date: Mon, 12 Apr 2021 11:22:18 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]