Приветствую Игорь Демонов,
21.07.2024 13:42, Игорь Демонов пишет:
> Нет, у меня Win11, Jaws 2024, тоже не работают предложенные способы.
Доработал функцию.
Теперь у меня читает английскую раскладку 3 символа, русскую - 2.
Проверьте, плз, кто-нибудь ещё с такой же проблемой.
void function KeyboardLanguageChangedEvent(string sLayoutName, int
nLangId, string sLangAbbrev)
var
string sMsg,
string sLayoutMod
if GetJCFOption(OPT_DETECT_KEYBOARD_INPUT_LANGUAGE)
if (sLangAbbrev!=cscNull) then
;need to use sAbbrev in call to SetTypingEchoLanguage
SetTypingEchoLanguage(sLangAbbrev)
endIf
EndIf
if UseUnifiedKeyboardProcessing() Then
PerformScript SwitchInputLanguage()
EndIf
If ! gbKeyboardLayoutChange then
Return
EndIf
ScheduleFunction("KillgbKeyboardLayoutChange",
DelayWhileKeyboardInputSwitching)
if sLayoutName != cscNull && ActiveLayoutName != cscNull
&& (ActiveLangId != nLangId || ActiveLayoutName != sLayoutName)
if UseUnifiedKeyboardProcessing() && GetDefaultJCFOption
(OPT_TYPING_INTERRUPT)
; Legacy keyboard has keyboard switching as JAWS script and
executing script interrupts speech.
; Unified doesn't have a script for this and just passes it to
the system so we'll need to StopSpeech manually.
StopSpeech()
Endif
let sMsg = FormatString (cKeyboardLayout_L, sLayoutName)
;Cause OT_STATUS message to be short where it applies:
let sLayoutMod = stringChopLeft(sMsg,10)
if (StringLength(sLayoutMod)!=3)
SayString (stringChopRight(sLayoutMod, 5))
else
SayString (sLayoutMod)
EndIf
endIf
ActiveLangId = nLangId
ActiveLayoutName = sLayoutName
endFunction