Bug 1460

Summary: XKB Keyboard Layout: How to Enter More than 1 Character using 1 keycode (key press)?
Product: xorg Reporter: Asif Ali Rizwaan <maarizwan>
Component: Lib/XlibAssignee: Sergey V. Udaltsov <svu>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: low CC: jamil, petrosyan
Version: 7.0.0   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Asif Ali Rizwaan 2004-09-24 04:54:51 UTC
I want to use Hindi (devanagari) in Linux but due to some problem in XKB 
Configuration, I can't be productive in typing Hindi in Linux than in Windows. 

In Windows you can assign more than 1 character to 1 key press, using Microsoft 
Keyboard Layout creator software. 
(http://www.microsoft.com/globaldev/tools/msklc.mspx)

e.g., pressing key character      can get 
        'a'                      'America', 
        'b'                      'Brazil' or 'brrrrr'
        'c'                      'D' (possible in Linux)

The Same can't be true in Linux. We can't assign a string (more than 1 
character) to a single key press (keycode). 

There are many characters in Hindi, Punjabi, Bengali, Gujrati, Telugu, Kannada, 
Tamil (Almost all Indian Languages) which would required more than 2 characters 
to be displayed.

E.g.,

Required Character         keyed in to get the Required Character
      JNA                            p+d+{  (three chars required)
      KSHA                           k+<    (two chars required)
      KSHRA                         k+<+d+j (four chars required)
      TRA                            l+d+j  (three chars required)

I have been googling and trying to delve into the XKB Documentation, but I 
could not get any working configuration of DEV keyboard layout to 'Generate 2-4 
characters with 1 key press.'

I would be very grateful if you could suggest a way out. Because of this '1 
keypress many chars' requirement 'Indian' and other 'Complex' Languages may 
suffer and Linux couldn't get a fully i18n user friendly medium for literary 
work.

Thank you for reading :)
Comment 1 MÃ¥rten Svantesson 2004-11-07 04:48:26 UTC
I would think that this bug is invalid for two reasons:

First, what is requested in this bug is that a keypress should be made to
generate several events. That would be (at least) changing the XKB standard. I
don't see that as the scope of this project.

Secondly it seems to me that what is happening in the bug is that X is handling
events to an input method that then assembles them to characters. For example
the events for pressing the keys p+d+{ give the character JNA. Now, the requstor
wants a single event to give a certain character. This should be handled by
configureing the input method. The user don't give any information about which
program is used, so I can't even begin to help.
Comment 2 Pablo Saratxaga 2005-03-08 08:20:39 UTC
You can do what you want using the Compose file, eg:

<a> : "America"
<b> : "brrrrr"
<c> : "D"

(but you must know that then you won't be able to type those
letters on the left side! you should better have your keyboard layout
generate some unicode keysyms in unused or userdefined ranges,
that is, and then translate those in Compose file)
Comment 3 Ani 2005-10-24 04:57:19 UTC
Is there any way to achieve this without modifying the "Compose" file?
For example in Armenian we would like to have the letter "u" produce 2
characters "&#1400;&#1410;"

<u> : "&#1400;&#1410;"

What would be the easiest way to achieve this?
Comment 4 Asif Ali Rizwaan 2005-10-24 08:14:56 UTC
The user don't give any information about which program is used, so I can't 
even begin to help. 
 
using Slackware 10.1, application/programs used are all editors like kword, 
kwrite, gedit, openoffice writer, etc., 
 
I use this command to switch the keyboard layout (in KDE) 
 
For Hindi: 
setxkbmap -model microsoftpro -layout dev -variant basic 
 
For English: 
setxkbmap -model microsoftpro -layout us -variant intl 
 
Btw, could you please tell me how do i change the compose file, I can see that 
the compose file is present at "/etc/X11/xkb/symbols/compose", but a small 
example to generate  
 
string -> "abcd" when character ->"a" key is pressed would really help me, and 
I could upload the compose file for other fellow users. thanks.              
Comment 5 Sergey V. Udaltsov 2005-12-30 07:51:37 UTC
It is Compose thingie (xkeyboard-config does not deal with it), so reassigning
the bug...
Comment 6 Daniel Stone 2006-03-05 08:07:28 UTC
more sensible input methods would be welcome
Comment 7 Daniel Stone 2006-04-10 14:45:20 UTC

*** This bug has been marked as a duplicate of 4575 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.