[Uim] A problem using uim and anthy in KDE

YamaKen yamaken at bp.iij4u.or.jp
Fri Feb 27 03:24:34 EET 2004


At Thu, 26 Feb 2004 09:10:31 +1100,
Paul.Hampson at anu.edu.au wrote:
> 
> On Wed, Feb 25, 2004 at 02:24:17PM +0900, YamaKen wrote:
> > I have just finished implementing a new key-binding method,
> > called 'define-key'. This makes key-binding easy as following.
> 
> > (define-key anthy-kana-toggle-key? "q")
> 
> That's _great_.

:-)

> Is there a reference for the exact key syntax to use? (I saw
> in key.scm a reference to 'Emacs-like' and I'm wondering if
> that's what the definitions are) as I'd like to get Super_L
> working for me without resorting to xmodmap.

Is 'Super_L' popular on some (language-specific) environment?
If so, uim should add it as standard keysym and you get happy.

Reference doc for define-key is not written yet. As rough
explanation, there is some basic rules.

1. it accepts single ascii char
   (define-key anthy-kana-toggle-key? "q")

2. single ascii char is case sensitive
   (define-key anthy-commit-as-opposite-kana-key? "Q")

3. it also accepts keysyms (see uim-key.c)
   (define-key generic-beginning-of-preedit-key? "home")

4. it also accepts previously defined key
   (define-key anthy-delete-key? 'generic-delete-key?)

5. keys can be modified
   (define-key my-delete-key? "<Control>d")
   (define-key reset-key? "<Control><Alt>delete")

6. <Shift> modifier is implied for single ascii char appropriately
   (define-key foo-key? "<Control>A")  ;actually Control + Shift + a
   (define-key bar-key? "<Alt>%")      ;actually Alt + Shift + 5
   (define-key baz-key? "<Shift>home") ;non-ascii keys need explicit shift

7. keys can be or'ed
   (define-key anthy-hankaku-kana-key? '("<Control>q" "<Control>Q"))
   (define-key anthy-on-key? '("<Control>j" "<Control>J" generic-on-key?))

And some advanced rules.

8. it also accepts define-time dereference rather than runtime dereference
   (define-key my-on-key? generic-on-key?)
   ;after now, redefinition of generic-on-key? not affects my-on-key?

   ;overriding preexisting definition
   (define-key generic-on-key? (list "<Alt>`" generic-on-key?))

   ;bad definition: causes infinite loop
   (define-key generic-on-key? (list "<Alt>`" 'generic-on-key?))

9. it also accepts emacs-like syntax
   (define-key reset-key? "C-A-delete")
   (define-key baz-key? "S-home")
   (define-key anthy-on-key? '("C-j" "C-J" generic-on-key?))

> > See anthy.scm for more example. Transitions on any other files
> > such as generic-key.scm will follow soon.
> 
> This'll fix my next comment, the fact that ascii values are
> being used which makes it _hard_ to look up. :-)

Probably you're feeling same pain as me. I'm tired with typing
"man ascii"...

> > http://freedesktop.org:8080/svn/uim/trunk/scm/anthy.scm
> 
> OK, I'll bite... Where's the function itself defined?

What "the function" mean?
define-key itself? or a predicate that generated by define-key?

> Is this going to be in the next release?

Maybe. I want so strongly.

-------------------------------
YamaKen  yamaken at bp.iij4u.or.jp




More information about the uim mailing list