Skip to content

[Win] Implement Simple Telex 2 #289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Sources/OpenKey/win32/OpenKey/OpenKey/OpenKeyManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ redistribute your new version, it MUST be open source.
static vector<LPCTSTR> _inputType = {
_T("Telex"),
_T("VNI"),
_T("Simple Telex"),
_T("Simple Telex 1"),
_T("Simple Telex 2"),
};

static vector<LPCTSTR> _tableCode = {
Expand Down
17 changes: 12 additions & 5 deletions Sources/OpenKey/win32/OpenKey/OpenKey/SystemTrayHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ redistribute your new version, it MUST be open source.

#define POPUP_TELEX 910
#define POPUP_VNI 911
#define POPUP_SIMPLE_TELEX 912
#define POPUP_SIMPLE_TELEX_1 912
#define POPUP_SIMPLE_TELEX_2 913

#define POPUP_UNICODE 930
#define POPUP_TCVN3 931
Expand Down Expand Up @@ -59,7 +60,8 @@ map<UINT, LPCTSTR> menuData = {
{POPUP_USE_MACRO, _T("Bật gõ tắt")},
{POPUP_TELEX, _T("Kiểu gõ Telex")},
{POPUP_VNI, _T("Kiểu gõ VNI")},
{POPUP_SIMPLE_TELEX, _T("Kiểu gõ Simple Telex")},
{POPUP_SIMPLE_TELEX_1, _T("Kiểu gõ Simple Telex 1")},
{POPUP_SIMPLE_TELEX_2, _T("Kiểu gõ Simple Telex 2")},
{POPUP_UNICODE, _T("Unicode dựng sẵn")},
{POPUP_TCVN3, _T("TCVN3 (ABC)")},
{POPUP_VNI_WINDOWS, _T("VNI Windows")},
Expand Down Expand Up @@ -131,9 +133,12 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case POPUP_VNI:
AppDelegate::getInstance()->onInputType(1);
break;
case POPUP_SIMPLE_TELEX:
case POPUP_SIMPLE_TELEX_1:
AppDelegate::getInstance()->onInputType(2);
break;
case POPUP_SIMPLE_TELEX_2:
AppDelegate::getInstance()->onInputType(3);
break;
case POPUP_UNICODE:
AppDelegate::getInstance()->onTableCode(0);
break;
Expand Down Expand Up @@ -215,7 +220,8 @@ void SystemTrayHelper::createPopupMenu() {
//menuInputType = CreatePopupMenu();
AppendMenu(popupMenu, MF_CHECKED, POPUP_TELEX, menuData[POPUP_TELEX]);
AppendMenu(popupMenu, MF_CHECKED, POPUP_VNI, menuData[POPUP_VNI]);
AppendMenu(popupMenu, MF_CHECKED, POPUP_SIMPLE_TELEX, menuData[POPUP_SIMPLE_TELEX]);
AppendMenu(popupMenu, MF_CHECKED, POPUP_SIMPLE_TELEX_1, menuData[POPUP_SIMPLE_TELEX_1]);
AppendMenu(popupMenu, MF_CHECKED, POPUP_SIMPLE_TELEX_2, menuData[POPUP_SIMPLE_TELEX_2]);

//AppendMenu(popupMenu, MF_POPUP, (UINT_PTR)menuInputType, _T("Kiểu gõ"));
AppendMenu(popupMenu, MF_SEPARATOR, 0, 0);
Expand Down Expand Up @@ -262,7 +268,8 @@ void SystemTrayHelper::updateData() {
MODIFY_MENU(popupMenu, POPUP_USE_MACRO, vUseMacro);
MODIFY_MENU(popupMenu, POPUP_TELEX, vInputType == 0);
MODIFY_MENU(popupMenu, POPUP_VNI, vInputType == 1);
MODIFY_MENU(popupMenu, POPUP_SIMPLE_TELEX, vInputType == 2);
MODIFY_MENU(popupMenu, POPUP_SIMPLE_TELEX_1, vInputType == 2);
MODIFY_MENU(popupMenu, POPUP_SIMPLE_TELEX_2, vInputType == 3);
MODIFY_MENU(popupMenu, POPUP_UNICODE, vCodeTable == 0);
MODIFY_MENU(popupMenu, POPUP_TCVN3, vCodeTable == 1);
MODIFY_MENU(popupMenu, POPUP_VNI_WINDOWS, vCodeTable == 2);
Expand Down