Skip to content

Commit

Permalink
bug fix: 'Right Ctrl + x' did not work in Emacs
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGyver83 committed Jan 6, 2021
1 parent aa88d67 commit a7fb452
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ TCHAR mappingTableLevel1[LEN] = {0};
TCHAR mappingTableLevel2[LEN] = {0};
TCHAR mappingTableLevel3[LEN] = {0};
TCHAR mappingTableLevel4[LEN] = {0};
TCHAR mappingTableLevel5[LEN];
TCHAR mappingTableLevel6[LEN];
CHAR mappingTableLevel4Special[LEN];
TCHAR mappingTableLevel5[LEN] = {0};
TCHAR mappingTableLevel6[LEN] = {0};
CHAR mappingTableLevel4Special[LEN] = {0};
TCHAR numpadSlashKey[7];

void SetStdOutToNewConsole()
Expand Down Expand Up @@ -177,8 +177,6 @@ void mapLevels_2_5_6(TCHAR * mappingTableOutput, TCHAR * newChars)
}

void initLevel4SpecialCases() {
mappingTableLevel4Special = {0};

mappingTableLevel4Special[16] = VK_PRIOR;

if (strcmp(layout, "kou") == 0 || strcmp(layout, "vou") == 0) {
Expand Down Expand Up @@ -246,12 +244,6 @@ void initLevel4SpecialCases() {

void initLayout()
{
// initialize the mapping tables for levels 5 and 6
if (supportLevels5and6) {
mappingTableLevel5 = {0};
mappingTableLevel6 = {0};
}

// same for all layouts
wcscpy(mappingTableLevel1 + 2, L"1234567890-`");
wcscpy(mappingTableLevel1 + 71, L"789-456+1230.");
Expand Down Expand Up @@ -785,7 +777,7 @@ boolean handleShiftKey(KBDLLHOOKSTRUCT keyInfo, WPARAM wparam, bool ignoreShiftC
**/
boolean handleSystemKey(KBDLLHOOKSTRUCT keyInfo, bool isKeyUp) {
bool newStateValue = !isKeyUp;
DWORD dwFlags = isKeyUp ? KEYEVENTF_KEYUP : 0;
DWORD dwFlags = isKeyUp ? KEYEVENTF_KEYUP : keyInfo.flags;

// Check also the scan code because AltGr sends VK_LCONTROL with scanCode 541
if (keyInfo.vkCode == VK_LCONTROL && keyInfo.scanCode == 29) {
Expand Down

0 comments on commit a7fb452

Please sign in to comment.