Let’s try updating the driver for the mouse and keyboard and verify the results. Follow the steps:
a) Press Windows and X key together and select Device Manager.
b) Locate the Keyboard device icon. Right click on the driver icon.
c) Select Update driver software.
c) Select "browse my computer for a driver software".
d) Select “Let me pick from a list of device drivers on my computer”.
e) Select the driver option according to your device model and installed.
f) If this does not work, follow the steps from ‘a’ to ‘c’ and select “Search automatically for the updated driver”.
g) Choose the same steps to update the driver for the keyboard as well.
Check if it resolves the issue. If not, I would suggest you download and install the latest available drivers for the keyboard from manufacturer website of the laptop. If the issue still persists, install the driver in Windows Compatibility mode and check if that helps.
Refer to the link to run the Windows Compatibility troubleshooter to install the drivers: