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

Re: Using .XCompose



Hi David,

Thanks for your reply.
>>>>
I presume XCompose(3) is a typo for 5, the file format section.
There you will find that you don't use the XK_ prefix here.
>>>>

I was looking at XCompose(3). Thanks for pointing out the mistake.

>>>>
As I understand .XCompose, it is designed for "compositing", so each
key on the left side should be a "normal" keystroke. Typically the
LeftShift modifies the letter keys: in English, it makes "a" into "A".
So you wouldn't want to use it in a compositing sequence because you
would lose its normal shift function.
>>>>
I understand that. My letter is in the 'shift' set of keystrokes. That was the reason I included it. Moreover, the Compose manual page states that

'Each event consists of a specified input keysym, and optional modifier states:

[([!] ([~] MODIFIER)...) | None] <keysym>". '

I was just trying to find out the reason why the 'composting' was not working. I tried including the modifier name and also without it. I tried moving the key to the first layer of keyboard layout (without shift or other modifiers). Even that was not working. So, I was wondering if there was a syntax error in the way I was specifying my requirement. I understand the use of Compose key. But, I was not trying the usual 'composting' (by means of a compose key). I  want one character to be replaced with its geminate form whenever it is typed. If the keyboard layout specification allowed more than one character for a keystroke, I wouldn't have needed it. Hence the need for Compose mechanism. A similar approach is explained here https://dominiko.livejournal.com/20206.html . However in it, the author has defined a personal use Unicode character, but I use one of the Unicode defined characters. In the symbol file, he had used
key <AD01> { type[group1] = "FOUR_LEVEL_C_HWERTY",
                [            UF8FD,          UF8FE,           UF8FF,    Greek_alpha ] };

I didn't understand the use of type[group1 = "..."], but thought that it was not essential. Anyway, the layout is working as expected in that the characters returned by layout is as defined.
The compose mechanism is not working.

I copied one line from your keyboard configuration file and  my keyboard file looks like this now :
# KEYBOARD CONFIGURATION FILE

XKBMODEL="pc105"
XKBLAYOUT="in"
XKBVARIANT="eng"
XKBOPTIONS="lv3:ralt_switch,compose:caps,terminate:ctrl_alt_bksp"

BACKSPACE="guess"

and my .XCompose file now is
include "%L"
<Multi_key> <s> <x>                     : "✄"   U2704 # WHITE SCISSORS

However, when I press Caps Lock followed by s and then x or if I keep the Caps Lock pressed while I press s and x in sequence, I don't get scissors. I get S and X

So, my computer's  compose mechanism is not working. Is there something wrong in what I am doing or am I missing something? Other than creating the .XCompose file in the home folder, should I tell the system in some way that the compose mechanism should be activated? (BTW, I tried restarting the computer after the change).

I am running Debian 10, KDE Plasma  5.14.5, 64 bit

Thanks,
ajith

On Tuesday, 7 July, 2020, 4:00:50 am IST, David Wright <deblis@lionunicorn.co.uk> wrote:


On Mon 06 Jul 2020 at 05:34:59 (+0000), Ajith R wrote:


> My .XCompose file in my home directory is---------------------include "%L"
> <XK_Shift_L> <U0D19> : "ങ്ങ"
> <U0D19> : "ങ്ങ"
> ങ : "ങ്ങ"---------------------
> I found the name XK_Shift_L in keysymdef.h file. I tried the unicode character and its code as well to identify the keypress. I tried with only one of the lines as well. XCompose(3) — libx11-doc — Debian buster — Debian Manpages was consulted. I have tried restarting after making changes which didn't help.
> Am I referring to the keypress correctly? What am I missing?


I presume XCompose(3) is a typo for 5, the file format section.
There you will find that you don't use the XK_ prefix here.

As I understand .XCompose, it is designed for "compositing", so each
key on the left side should be a "normal" keystroke. Typically the
LeftShift modifies the letter keys: in English, it makes "a" into "A".
So you wouldn't want to use it in a compositing sequence because you
would lose its normal shift function.

Usually you select a "Compose" key, and that is used here under the name
<Multi_key> in .XCompose, and in the system's Compose file,
/usr/share/X11/locale/…/Compose where … is a locale's name.
Mine, for example, is CapsLock, because I don't make a habit of typing
in All Caps. That is set in /etc/default/keyboard:
XKBOPTIONS="lv3:ralt_switch,compose:caps,terminate:ctrl_alt_bksp"
                            ↑↑↑↑↑↑↑↑↑↑↑↑

If you peruse your own system's /usr/share/X11/locale/…/Compose file,
which is the one being included by your "%L" above, you'll get an idea
of the best keys to use. I believe many European languages use the
"dead" keys a lot, but because British doesn't, I don't know how those
work. A European might like to comment on this.

In case it's any help, I posted some keyboard configuration files
last year at:

https://lists.debian.org/debian-user/2019/07/msg00926.html

The first section is an incomplete set of function keys for my window
manager; the next section defines keys for VCs (where I include the
system defaults to preserve them); following that is my .XCompose.
The system defaults already include most of what I want, so I add
only 14 more. The final section is a few definitions from my emacs
configuration.

Cheers,
David.



Reply to: