summaryrefslogtreecommitdiff
path: root/plugins/ChangeKeyboardLayout/src/hook_events.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ChangeKeyboardLayout/src/hook_events.cpp')
-rw-r--r--plugins/ChangeKeyboardLayout/src/hook_events.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
index 0ec26cf5f8..77917a3851 100644
--- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp
+++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
@@ -97,7 +97,7 @@ int ModulesLoaded(WPARAM, LPARAM)
{
LPCTSTR ptszEmptySting = L"";
- // . - .
+ // Заполняем конфигурационные строки из базы. Если их там нет - генерируем.
for (int i = 0; i < bLayNum; i++) {
LPTSTR ptszCurrLayout = GenerateLayoutString(hklLayouts[i]);
LPSTR ptszTemp = GetNameOfLayout(hklLayouts[i]);
@@ -115,17 +115,17 @@ int ModulesLoaded(WPARAM, LPARAM)
mir_free(ptszTemp);
}
- //
+ // Прочитаем основные настройки
ReadMainOptions();
- //
+ // Прочитаем настройки попапов
ReadPopupOptions();
- //
+ // Зарегим звук
Skin_AddSound(SND_ChangeLayout, ModuleNameW, LPGENW("Changing Layout"));
Skin_AddSound(SND_ChangeCase, ModuleNameW, LPGENW("Changing Case"));
- //
+ // Хук на нажатие клавиши
kbHook_All = SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC)Keyboard_Hook, nullptr, GetCurrentThreadId());
CreateServiceFunction(MS_CKL_CHANGELAYOUT, APIChangeLayout);
@@ -171,7 +171,7 @@ LRESULT CALLBACK Keyboard_Hook(int code, WPARAM wParam, LPARAM lParam)
if ((wParam != VK_SHIFT) && (wParam != VK_MENU) && (wParam != VK_CONTROL) && (wParam != VK_LWIN) && (wParam != VK_RWIN))
lcode += wParam;
- // . - , 1.4
+ // Проверка на пустой хоткей. Иначе - пиздец, как в версии 1.4
if (lcode != 0) {
if ((lcode == moOptions.dwHotkey_Layout) && (!(lParam & 0x40000000))) {
ChangeLayout(nullptr, TOT_Layout, moOptions.CurrentWordLayout);