Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When switching meow mode, could sis switch the Chinese and English input methods accordingly? #64

Open
Prague2049 opened this issue Oct 15, 2023 · 1 comment

Comments

@Prague2049
Copy link

When switching meow mode, could sis switch the Chinese and English input methods accordingly?
Is it possible to enter insert mode of meow when pressing the i key and the rime input method is Chinese?
Is it the English input method for rime when pressing the ESC key to enter kaypad mode?

@roife
Copy link
Contributor

roife commented Oct 28, 2023

(defvar meow-leave-insert-mode-hook nil
  "Hook to run when leaving meow insert mode.")
(defvar meow-enter-insert-mode-hook nil
  "Hook to run when entering meow insert mode.")
(add-hook! meow-insert-mode-hook
  (defun +meow-insert-mode-run-hook-on-mode ()
    (run-hooks
     (if meow-insert-mode 'meow-enter-insert-mode-hook
       'meow-leave-insert-mode-hook))
    )
  )

;; ...

  (add-hook 'meow-leave-insert-mode-hook #'sis-set-english)
  (add-to-list 'sis-context-hooks 'meow-enter-insert-mode-hook)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants