[SCIM] Custom Keyboard Layout Editor/Interpreter for SCIM

Yukiko Bando ybando at k6.dion.ne.jp
Sun Nov 21 22:32:54 PST 2004


Hello,

With M17N, SCIM can support more than thirty languages, but there is not an 
easy way to type Western/Eastern European languages on a Japanese/Chinese or 
US standard keyboards.  Users have to change the whole keyboard layout to 
another language (this is what KDE offers) or use Multi keys to input 
non-English characters unless they use customized xmodmaps.  The first option 
is confusing because it often causes mismatch between the glyph printed on a 
key and what users actually get.  The second one is not for everyone either, 
IMHO.  Multi keys are not as easy to use as dead keys...

So I think it would be nice if there is a tool which allows users to easily 
modify just couple of or several keys, not the *whole* keyboard layout, to 
input *some* non-English characters.  Few people would need all the characters 
in all European languages every day.  Since SCIM supports dead keys, what 
about adding such a tool to SCIM?  It will make SCIM even more 
multilingual. :)


Here's what I have in my mind...  

------
The first thing to do is prepare a list of all characters and dead keys which 
are needed to support:

   http://en.wikipedia.org/wiki/ISO_8859-1 and
   http://en.wikipedia.org/wiki/ISO_8859-2

The information will be kept in a text file like this: 

   (name/glyph/languages which use it) 
   dead_acute/´/fr,es,pt,...
   aacute/á/fr,es,pt,...
   Aacute/Á/fr,es,pt,...
   <snip>
   dead_doubleacute/˝/hu
   odoubleacute/ő/hu
   Odoubleacute/Ő/hu
   <snip>
   ntilde/ñ/es
   Ntilde/Ñ/es
   aring/å/no
   Aring/Å/no
   oslash/ø/no
   Ooblique/Ø/no
   etc. etc.

-----------------------------------
How to create a new layout
-----------------------------------
1. Users are asked to choose (a) language(s) for which they want to modify 
their keyboard layout.  Then SCIM will refer to the above-mentioned file and 
show a list of characters/dead keys that are commonly used in the selected 
languages.  If users choose 'All', they can see the complete list. 

2. Users can map each character to a key or a combination of keys just like 
editing keyboard shortcuts.  Definitions will be saved like this:
  
   (example for Hungarian) 
   slash = dead_acute
   semicolon = dead_diaeresis
   backslash = dead_doubleacute
   
   (example for Spanish)
   slash  = dead_acute 
   backslash = ntilde
   Shift backslash = Ntilde
   Alt q = questiondown

It is possible to make a layout which supports multiple languages if you like.

Users will be warned when they try to reuse a key or a combination of keys 
that is already defined. 

3. The files are saved in ~/.scim/custom or something like that in a plain 
text with a user defined name. Users may edit them directly in a text editor 
if they like.  
   
----------------
How to use it
----------------
1. Users choose one from the SCIM's input methods menu:

    Custom Keyboards > MyHungarian  
    Custom Keyboards > MySpanish

2. When it is activated, SCIM interprets inputted characters according to the 
corresponding file in ~/.scim/custom.    
 
  (MyHungarian) 
   /+e becomes é
   /+(Shift+e) becomes É
   ;+o becomes ö
   ;+(Shift+o) becomes Ö
   \+u becomes ű   < if you see a square, please copy&paste it to gedit
   \+(Shift+u) becomes Ű
   etc. etc.  

  (MySpanish)
   /+a becomes á 
   /+(Shift+a) becomes Á   
   \ becomes ñ
   Shift+\ becomes Ñ 
   Alt+q becomes ¿
   etc. etc.

3. How to type / \ ; then?
Users can easily go back to their original keyboard layout with Ctrl+Space, so 
I don't think it's a big problem.  And they may use other keys that are used 
much less often, though such keys tend to be localted on the outside edges.    

-----
I think it might be useful for some people like students who learn European 
languages other than English in Asia.  It's not for native writers, of 
course, but It will also make possible to type Norwegian on a French keyboard 
without losing the AWERTY layout.

What do you think?  Is it feasible?

Regards,
Yukiko


More information about the scim mailing list