mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 13:16:07 +00:00
[INPUT]
- Draw 0x2022 unicode symbol instead 0x25CF (marking default input method) - Fix incorrect logic in CapsLock parameters - Notice system of change CapsLock mode parameters svn path=/trunk/; revision=72189
This commit is contained in:
parent
22c0bb2723
commit
4245233f5f
3 changed files with 34 additions and 20 deletions
|
@ -67,6 +67,9 @@ typedef struct
|
||||||
INT_PTR CALLBACK
|
INT_PTR CALLBACK
|
||||||
KeySettingsDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
KeySettingsDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
|
DWORD
|
||||||
|
ReadAttributes(VOID);
|
||||||
|
|
||||||
/* key_sequence_dialog.c */
|
/* key_sequence_dialog.c */
|
||||||
INT_PTR CALLBACK
|
INT_PTR CALLBACK
|
||||||
ChangeKeySeqDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
ChangeKeySeqDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
|
@ -10,9 +10,10 @@
|
||||||
static KEY_SETTINGS _KeySettings = { 0 };
|
static KEY_SETTINGS _KeySettings = { 0 };
|
||||||
|
|
||||||
|
|
||||||
static VOID
|
DWORD
|
||||||
ReadKeysSettings(VOID)
|
ReadAttributes(VOID)
|
||||||
{
|
{
|
||||||
|
DWORD dwAttributes = 0;
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_CURRENT_USER,
|
if (RegOpenKeyExW(HKEY_CURRENT_USER,
|
||||||
|
@ -25,18 +26,25 @@ ReadKeysSettings(VOID)
|
||||||
|
|
||||||
dwSize = sizeof(dwSize);
|
dwSize = sizeof(dwSize);
|
||||||
|
|
||||||
if (RegQueryValueExW(hKey,
|
RegQueryValueExW(hKey,
|
||||||
L"Attributes",
|
L"Attributes",
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
(LPBYTE)&_KeySettings.dwAttributes,
|
(LPBYTE)&dwAttributes,
|
||||||
&dwSize) != ERROR_SUCCESS)
|
&dwSize);
|
||||||
{
|
|
||||||
_KeySettings.dwAttributes = (DWORD) -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return dwAttributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
static VOID
|
||||||
|
ReadKeysSettings(VOID)
|
||||||
|
{
|
||||||
|
HKEY hKey;
|
||||||
|
|
||||||
|
_KeySettings.dwAttributes = ReadAttributes();
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_CURRENT_USER,
|
if (RegOpenKeyExW(HKEY_CURRENT_USER,
|
||||||
L"Keyboard Layout\\Toggle",
|
L"Keyboard Layout\\Toggle",
|
||||||
0,
|
0,
|
||||||
|
@ -126,10 +134,13 @@ WriteKeysSettings(VOID)
|
||||||
(wcslen(szBuffer) + 1) * sizeof(WCHAR));
|
(wcslen(szBuffer) + 1) * sizeof(WCHAR));
|
||||||
|
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
|
|
||||||
/* Notice system of change of parameters */
|
|
||||||
SystemParametersInfoW(SPI_SETLANGTOGGLE, 0, NULL, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Notice system of change hotkeys parameters */
|
||||||
|
SystemParametersInfoW(SPI_SETLANGTOGGLE, 0, NULL, 0);
|
||||||
|
|
||||||
|
/* Notice system of change CapsLock mode parameters */
|
||||||
|
ActivateKeyboardLayout(GetKeyboardLayout(0), KLF_RESET | _KeySettings.dwAttributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -178,20 +189,20 @@ OnInitKeySettingsDialog(HWND hwndDlg)
|
||||||
|
|
||||||
if (_KeySettings.dwAttributes & KLF_SHIFTLOCK)
|
if (_KeySettings.dwAttributes & KLF_SHIFTLOCK)
|
||||||
{
|
{
|
||||||
CheckDlgButton(hwndDlg, IDC_PRESS_SHIFT_KEY_RB, BST_UNCHECKED);
|
CheckDlgButton(hwndDlg, IDC_PRESS_SHIFT_KEY_RB, BST_CHECKED);
|
||||||
CheckDlgButton(hwndDlg, IDC_PRESS_CL_KEY_RB, BST_CHECKED);
|
CheckDlgButton(hwndDlg, IDC_PRESS_CL_KEY_RB, BST_UNCHECKED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CheckDlgButton(hwndDlg, IDC_PRESS_SHIFT_KEY_RB, BST_CHECKED);
|
CheckDlgButton(hwndDlg, IDC_PRESS_SHIFT_KEY_RB, BST_UNCHECKED);
|
||||||
CheckDlgButton(hwndDlg, IDC_PRESS_CL_KEY_RB, BST_UNCHECKED);
|
CheckDlgButton(hwndDlg, IDC_PRESS_CL_KEY_RB, BST_CHECKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
hwndList = GetDlgItem(hwndDlg, IDC_KEY_LISTVIEW);
|
hwndList = GetDlgItem(hwndDlg, IDC_KEY_LISTVIEW);
|
||||||
|
|
||||||
ListView_SetExtendedListViewStyle(hwndList, LVS_EX_FULLROWSELECT);
|
ListView_SetExtendedListViewStyle(hwndList, LVS_EX_FULLROWSELECT);
|
||||||
|
|
||||||
ZeroMemory(&column, sizeof(column));
|
ZeroMemory(&column, sizeof(column));
|
||||||
|
|
||||||
column.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
|
column.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
|
||||||
|
|
||||||
|
@ -243,7 +254,7 @@ KeySettingsDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
case IDOK:
|
case IDOK:
|
||||||
{
|
{
|
||||||
if (IsDlgButtonChecked(hwndDlg, IDC_PRESS_CL_KEY_RB) == BST_UNCHECKED)
|
if (IsDlgButtonChecked(hwndDlg, IDC_PRESS_CL_KEY_RB) == BST_CHECKED)
|
||||||
{
|
{
|
||||||
_KeySettings.dwAttributes &= ~KLF_SHIFTLOCK;
|
_KeySettings.dwAttributes &= ~KLF_SHIFTLOCK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ CreateLayoutIcon(LPWSTR szLayout, BOOL bIsDefault)
|
||||||
ExtTextOutW(hdc, rect.left, rect.top, ETO_OPAQUE, &rect, L"", 0, NULL);
|
ExtTextOutW(hdc, rect.left, rect.top, ETO_OPAQUE, &rect, L"", 0, NULL);
|
||||||
|
|
||||||
SelectObject(hdc, hFont);
|
SelectObject(hdc, hFont);
|
||||||
DrawTextW(hdc, L"\x25CF", 1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
|
DrawTextW(hdc, L"\x2022", 1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue