Thanks very much !

Now how to simulate `shift' key in elisp just like I stroke it ?

How to know the current input state ?

Below is my thought :
I use scim .  When I input chinese , It  use `space' to choose the first character after I input `chinese pinyin'.
So if we simulate `k ' (k and a space) , when the character before point is not `k '  I can know the current state is chinese. (This relate to character code problem)

Is there any other better method?

Thanks again.