Hi,

I got UIM to ignore the left and right arrow keys as I and intended. Thank
you.

UIM now ignores the left and the right arrow keys but the ignored keys do
not reach the application(Qt) while uim is in composing state. Is there a
way that uim forwards the ignored keys to the application/widget?

In other words, I want some keys(left,right) to bypass UIM completely to
reach to the application(widget).

Thank you,
Rahul

On Mon, May 7, 2012 at 3:12 PM, uimuser uimuser <uimus...@gmail.com> wrote:

> Thank you for the reply.
>
> I tried the code that your sent, but it did not ignore the right arrow key.
>
> Here are the steps that I followed to test:
> 1) press 's' - it displayed  'ㄴ'
> 2) press the right arrow, it still displayed  ' ㄴ'
> 3) then I pressed 'p', it displayed "ㄴ ㅔ"  instead of "네"
>
> So, hitting right arrow mark the completion of the currently composing
> character.
> Is there any document to understand the .uim file?
>
> I am using uim version 1.6.1.
> Rahul
>
>
> On Mon, May 7, 2012 at 12:54 PM, jhpark <jhy...@gmail.com> wrote:
>
>> Hi,
>>
>> On May 7, 7:08 pm, uimuser1 <uimus...@gmail.com> wrote:
>> > I am a new uim user.  I am using UIM for the korean language. I am
>> > trying to figure out a way in UIM to ignore the arrow keys.
>> >
>> > The press of right arrow key on the keyboard stops composing the
>> > current character and move on to composing the next character. Is
>> > there a way to ignore the arrow keys? I do not want the arrow key to
>> > complete the character composition.
>>
>> I assume that you are using byeoru.  I do not understand why you would
>> want such a non-standard behavior of the right arrow key.  If you get
>> used to it, you will likely have difficulties with the Korean IME on
>> Windows, Mac, and mobile phones, etc.  That said, you can let uim
>> ignore right arrow while composing a character, by putting the code
>> below into your ~/.uim.  I did not touch the commit-by-word mode since
>> I do not know how you want the arrow key to behave in that mode, but
>> you should be able to figure out how you can go further.
>>
>> Best,
>> Jae-hyeon
>>
>>
>> (require-module "byeoru")
>>
>> (define (byeoru-proc-input-state-with-preedit bc key key-state)
>>  (let* ((word (byeoru-context-word-ustr bc))
>>         (by-word? (byeoru-context-commit-by-word? bc)))
>>
>>    (define (commit-former-string)
>>      (byeoru-commit bc (apply string-append (ustr-former-seq word)))
>>      (ustr-clear-former! word))
>>
>>    (cond
>>
>>     ;; Hangul mode off.
>>     ((or (byeoru-latin-key? key key-state)
>>          (and byeoru-esc-turns-off? (eq? key 'escape)))
>>      (byeoru-flush bc)
>>      (if (eq? key 'escape)
>>          (im-commit-raw bc))
>>      (byeoru-context-set-on?! bc #f))
>>
>>     ((byeoru-backspace-key? key key-state)
>>      (if (not (if (eq? byeoru-layout 'byeoru-layout-romaja)
>>                   (byeoru-backspace-romaja bc)
>>                   (byeoru-automata-backspace (byeoru-context-automata
>> bc))))
>>          (ustr-cursor-delete-backside! word)))
>>
>>     ((and (byeoru-delete-key? key key-state) by-word?)
>>      (byeoru-flush-automata bc)
>>      (if (ustr-cursor-at-end? word)
>>          (begin
>>            (byeoru-commit bc (byeoru-make-whole-string bc))
>>            (byeoru-clear! bc)
>>            (im-commit-raw bc))
>>          (ustr-cursor-delete-frontside! word)))
>>
>>     ((and (byeoru-go-left-key? key key-state) by-word?)
>>      (byeoru-flush-automata bc)
>>      (ustr-cursor-move-backward! word))
>>
>>     ((and (byeoru-go-right-key? key key-state) by-word?)
>>      (byeoru-flush-automata bc)
>>      (if (ustr-cursor-at-end? word)
>>          (begin
>>            (byeoru-commit bc (byeoru-make-whole-string bc))
>>            (byeoru-clear! bc)
>>            (im-commit-raw bc))
>>          (ustr-cursor-move-forward! word)))
>>
>>     ((byeoru-go-right-key? key key-state))
>>
>>     ((and (byeoru-beginning-of-preedit-key? key key-state) by-word?)
>>      (byeoru-flush-automata bc)
>>      (ustr-cursor-move-beginning! word))
>>
>>     ((and (byeoru-end-of-preedit-key? key key-state) by-word?)
>>      (byeoru-flush-automata bc)
>>      (if (ustr-cursor-at-end? word)
>>          (begin
>>            (byeoru-commit bc (byeoru-make-whole-string bc))
>>            (byeoru-clear! bc)
>>            (im-commit-raw bc))
>>          (ustr-cursor-move-end! word)))
>>
>>     ((byeoru-conversion-key? key key-state)
>>      (if (not (byeoru-begin-conv bc))
>>          (commit-former-string)))
>>
>>     ;; Hangul jamo.
>>     ((if (eq? byeoru-layout 'byeoru-layout-romaja)
>>          (byeoru-feed-romaja-key bc key key-state)
>>          (byeoru-feed-hangul-key bc key key-state)))
>>
>>     ;; Commit the word.
>>     (else
>>      (byeoru-flush-automata bc)
>>      (let ((choices (or (eq? byeoru-layout 'byeoru-layout-romaja)
>>                         (byeoru-key-to-choices key key-state))))
>>        (if (string? choices)
>>            (begin
>>              (ustr-insert-elem! word choices)
>>              (commit-former-string))
>>            (begin
>>              (commit-former-string)
>>              (im-commit-raw bc))))))))
>>
>> --
>> Google Groups "uim-en" group
>> uim-en@googlegroups.com
>> http://groups.google.com/group/uim-en/about
>>
>
>

-- 
Google Groups "uim-en" group
uim-en@googlegroups.com
http://groups.google.com/group/uim-en/about

Reply via email to