emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Add keymap information to korean-hangul input method


From: Chen Zhaoyang
Subject: [PATCH] Add keymap information to korean-hangul input method
Date: Fri, 17 Feb 2023 22:26:35 -0600
User-agent: Gnus/5.13 (Gnus v5.13)

Hello,

The input method `korean-hangul` has no keymap information when queried
by `describe-input-method`. I wrote some minimal documentation for this
input method.

-- 
Chen Zhaoyang

---
 lisp/leim/quail/hangul.el | 51 +++++++++++++++++++++++++++++++++++++--
 1 file changed, 49 insertions(+), 2 deletions(-)

diff --git a/lisp/leim/quail/hangul.el b/lisp/leim/quail/hangul.el
index 46a2e5a6ba2..f8b804b66da 100644
--- a/lisp/leim/quail/hangul.el
+++ b/lisp/leim/quail/hangul.el
@@ -537,11 +537,58 @@ hangul-input-method-deactivate
         (setq describe-current-input-method-function nil))
     (kill-local-variable 'input-method-function)))
 
+(defconst hangul2-keymap-help-text
+  "key : hangul : ipa
+| q | ㅂ | p   |
+| Q | ㅃ | p̤   |
+| w | ㅈ | tɕ  |
+| W | ㅉ | tɕ̤  |
+| e | ㄷ | t   |
+| E | ㄸ | t̤   |
+| r | ㄱ | k   |
+| R | ㄲ | k̤   |
+| t | ㅅ | s   |
+| T | ㅆ | s̤   |
+| Y | ㅛ | jo  |
+| u | ㅕ | jʌ  |
+| i | ㅑ | ja  |
+| o | ㅐ | ɛ   |
+| O | ㅒ | jɛ  |
+| p | ㅔ | e   |
+| P | ㅖ | je  |
+| a | ㅁ | m   |
+| s | ㄴ | n   |
+| d | ㅇ | ŋ   |
+| f | ㄹ | l   |
+| g | ㅎ | h   |
+| h | ㅗ | o   |
+| j | ㅓ | ʌ   |
+| k | ㅏ | a   |
+| l | ㅣ | i   |
+| z | ㅋ | kʰ  |
+| x | ㅌ | tʰ  |
+| c | ㅊ | tɕʰ |
+| v | ㅍ | pʰ  |
+| b | ㅠ | ju  |
+| n | ㅜ | u   |
+| m | ㅡ | ɯ   |
+"
+  "Keymap help information for the korean-hangul2 input method.")
+
+;; (defun hangul-input-method-help ()
+;;   "Describe the current Hangul input method."
+;;   (interactive)
+;;   (with-output-to-temp-buffer "*Help*"
+;;     (princ hangul-input-method-help-text)))
+
 (defun hangul-input-method-help ()
   "Describe the current Hangul input method."
   (interactive)
-  (with-output-to-temp-buffer "*Help*"
-    (princ hangul-input-method-help-text)))
+  (let* ((help-text hangul-input-method-help-text)
+         (full-help-text (cond ((string= current-input-method "korean-hangul") 
(concat help-text "\n\n" hangul2-keymap-help-text))
+                               (t hangul-input-method-help-text))))
+    (with-output-to-temp-buffer "*Help*"
+      (princ full-help-text))))
 
 (define-obsolete-function-alias 'alphabetp 'hangul-alphabetp "29.1")
 
-- 
2.30.2


reply via email to

[Prev in Thread] Current Thread [Next in Thread]