kirainmoe / tongfang-macos

🍏Bring the latest macOS for your 💻Tongfang laptops!

Home Page:https://kirainmoe.feishu.cn/wiki/space/7123583296625180700

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Num Lock key doesn't work.Num Lock is off at Boot and Numeric Keypad is disabled.

LINGJP opened this issue · comments

Repair method:
Original code:

 // handle special cases
    switch (keyCode)
    {
        case 0x4e:  // Numpad+
        case 0x4a:  // Numpad- 

https://github.com/acidanthera/VoodooPS2/blob/6765507448327ade2c648de7e2eeb087d2d571cb/VoodooPS2Keyboard/VoodooPS2Keyboard.cpp#L1469-L1473

Modified code:

// handle special cases
    switch (keyCode)
    {
        case 0x45: // NumLock
            
            if (scanCode != 0xc5)
                setNumLock(!numLock());
            
            break;
        case 0x4e:  // Numpad+
        case 0x4a:  // Numpad- 

This small modification can fix the problem that NumLock numeric keyboard can't be used.

commented

Thanks for the patch you provided, but this issue does not occur to 8th gen or later Tongfang laptops. Although NumLock cannot toggle the state of NumPad, they have working NumPad.