Managed to make my caps checkbox work, but I still haven't figured out w...

...hy the initial state is 0 (or NO) even if visually the checkbox is checked when the program first runs. Managed to fix it by just setting the default state to 0, but it's just a hack