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

Re: Using .XCompose



On Wed, 8 Jul 2020 Ajith R wrote:
Hi Zenaan,

> Under the "Layout" tab, I have the option for "Compose key" - this
> is a drop down list, and I chose the "Scroll Lock" key as my
> compose key.
Similar options are there for KDE too. I tried setting the Compose
key from the KDE settings menu after trying

  xmodmap -e "keysym Caps_Lock = Multi_key"

suggested by Greg. My .XCompose file is:

include "%L"
<Multi_key> <s> <x>                     : "✄"   U2704 # WHITE SCISSORS

Now, things are even more strange. When I press the Caps Lock, a
strange character appears. (I copy pasted it, searched the net and
found it to be unicode compose character.)

Incidentally, I have sometimes found that attempting to copy-paste
strange characters can result in even *stranger* characters. (This has
the potential to lead to more confusion, instead of less.)

Since the character of interest is one you are typing yourself, you
might try this:

 $ xxd - # and then type whatever you want to examine

When you're done entering what you want to examine, type Ctrl-d. Type
it once if you're at the beginning of a new line. Type it twice if you
aren't. (Somebody smart might explain to us why this is so.)

If you don't have xxd installed, you could use the following line as a
poor man's xxd:

 $ od -Ax -tx1z -v - # type whatever, do Ctrl-d to end it, as above

the "od" program is in coreutils, which "apt-cache show coreutils"
says is an "Essential: yes" package. So you probably have it for sure.

Replace the last "-" with "> somefilename" (in either command above)
if you want to put the output into a file to show somebody else, or to
treasure it always as a keepsake. But make sure that "somefilename"
isn't already a file containing stuff you want to keep (because you
will lose that stuff forever, instantly).

Then when I type s, the Caps Lock light gets switched on and the
character S (caps) appears on screen. Then when I type X, the
compose character and S become invisible and x/X doesn't
appear. When I change focus to another window, the terminal in which
I was typing shows the compose character and S.

IT'S ALIVE!

Sorry, this is probably a very frustrating development. (I'm sure I'd
be pretty upset in your shoes.)

I wonder if the output from either

 $ xmodmap # with no arguments, just the bare command

or

 $ xmodmap -pk

would be illuminating.

The output from the first command (the bare command with no arguments)
will probably not be too overwhelming. It ought to summarise your
current modifier keys.

The output from the second is your keymap table, and will likely be of
considerable size. If you want to review it in the moment, I would
suggest doing

 $ xmodmap -pk | less -S

so you can examine it in a pager. The "-S" option keeps the pager from
wrapping long lines, and there could be some pretty long lines when
you print your current keymap table. This way you can get some
semblance of columns, and use the arrow keys to scroll left/right to
view those long lines, instead of having trying to disentangle a bunch
of wraparound garbage.

If you want to share the output with us here (and I hope that you do),
you can put the output into a pair of files like so:

 $ xmodmap > somefilename.pm
 $ xmodmap -pk > somefilename.pk

And then import them into a message body, however one does that in
your email setup.

As always, these commands all have manual pages, and you have these
pages installed if you have the commands. You can read them over if
you are at all curious, at least to reassure yourself that I'm not
telling you to do something evil that you don't want done.

 $ man command # read the command manual in a pager
 $ man -f command # see super-brief description of command
 $ man -k commandliketerm # search for pertinent commands

But you came here with a manual page referenced in your original post
at the top of this thread, didn't you? So you don't need me telling
you this.

this behaviour has not changed after I unchecked the settings
through KDE settings menu, after restarting computer, re-issuing
xmodmap command or changing the layout to us. The same sequence is
seen with typing in Kate as well. Even when I use Scroll Lock as the
compose key, the situation is only different in that the s is not
capitalised.

Any idea what might be wrong?

Well, I can't really say. I haven't quite followed the progression
here as closely as I would have liked to.

And I don't have a whole lot of experience with many of the tools that
you've been playing with. This is all a learning experience for me,
too.

But I am looking forward to seeing what we can sort out once we see
your modifier table and keymap table.

I hope your week has gone well, all things considered.

--
You won't feel the collar if you don't go anywhere.

Reply to: