fix CID1100650: possible NULL dereference
fix CID1201426 Explicit null dereferenced
fix CID1201427 Explicit null dereferenced
fix CID1201428 Explicit null dereferenced
fix possible NULL dereference
fix Ctrl/Shift/CtrlShift + Fn

Thanks to Kagetsuki for reporting about it