[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "bengali-probhat" input method don't work as expected (by me)
From: |
Visuwesh |
Subject: |
Re: "bengali-probhat" input method don't work as expected (by me) |
Date: |
Wed, 10 Aug 2022 13:05:38 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
[செவ்வாய் ஆகஸ்ட் 09, 2022] Akib Azmain Turja wrote:
> Visuwesh <visuweshm@gmail.com> writes:
>
>> [செவ்வாய் ஆகஸ்ட் 09, 2022] Akib Azmain Turja wrote:
>>
>>> I use Dvorak keyboard layout (actually the OS is converting QWERTY keys
>>> to Dvorak). All input methods were broken for me.
>>>
>>> So I've added the following to quail-keyboard-layout-alist:
>>>
>>> ("dvorak" . " 1!2@3#4$5%6^7&8*9(0)[{]}`~\
>>> '\",<.>pPyYfFgGcCrRlL/?=+ aAoOeEuUiIdDhHtTnNsS-_\\| ;:qQjJkKx\
>>> XbBmMwWvVzZ ")
>>>
>>> And set quail-keyboard-layout to Dvorak using quail-set-keyboard-layout.
>>>
>>> After doing the above, "english-dvorak" works as expected (yeah, that's
>>> not a great idea, but just to make sure it works), but still there is
>>> no effect on "bengali-probhat" input method. It looks like that it
>>> assumes that I'm using QWERTY and converts the keys like that.
>>>
>>> And by the way, why M-x describe-input-method RET english-dvorak shows
>>> nice keyboard while M-x describe-input-method RET bengali-probhat shows
>>> just a (translation?) table?
>>
>> This is because the bengali-probhat input method is not declared as a
>> "keyboard layout". The quail translation stuff kicks in only for those
>> input methods that have the KBD-TRANSLATE argument non-nil. Does the
>> following patch work for you?
>>
>> diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el
>> index e652f108dd..431d8369c1 100644
>> --- a/lisp/leim/quail/indian.el
>> +++ b/lisp/leim/quail/indian.el
>> @@ -702,7 +702,7 @@ "X"
>> ;; Probhat Input Method
>> (quail-define-package
>> "bengali-probhat" "Bengali" "BngPB" t
>> - "Probhat keyboard for Bengali/Bangla" nil t nil nil nil nil nil nil nil
>> nil t)
>> + "Probhat keyboard for Bengali/Bangla" nil t nil t t nil nil nil nil nil t)
>>
>> (quail-define-rules
>> ("!" ?!)
>>
>> You can simply eval the quail-define-package and quail-define-rules
>> forms after applying the patch to see the results.
>>
>
> Thanks, that works. But how can I do this from my init file? Tracking
> master is not an option for me right now.
I think you can do something like,
(with-temp-buffer
(activate-input-method "bengali-probhat")
(let ((quail-current-package (assoc "bengali-probhat"
quail-package-alist)))
(setf (nth 8 quail-current-package) t)))
(NOT TESTED!)
Eli, it looks like the patch I posted works well. Any chance we can
push it? It addresses all the points you made.