MSzturc/ThinkpadAssistant

[Bug] First unwanted Caplock notification

igorkulman opened this issue · 2 comments

Steps to reproduce:

  • enabled Capslock monitoring
  • quit ThinkpadAssistant
  • start ThinkpadAssistant
  • press any keyboard shortcut with a modifier key, cmd+space for example
  • observe "Capslock disabled" notification shown

This happens just once after ThinkpadAssistant starts.

I think this happens because the initial capslock state in CapslockMonitor is set to nil as I did not know how to get the initial value.  This causes the problem.

I found a C method to get the Capslock state: https://discussions.apple.com/thread/7094207?answerId=28445444022#28445444022

I will test it out and send a PR, I think this will help.