Is there a way to disable the keyboard in macos x?
I am looking for a way I can use this functinality in an application. So preferably something that can be done programatically and does not need root previlages?
I want the keyboard to be dsabled everywhere in the os, even if the application is in the background, until I enable it by pushing a butten for example.
I am new to mac os programming so will appreciate more elaborations :)
UPDATE: I am trying to use this: CGEventTapCreate but cannot get it to work. Anyone nows how to make it work in swift 3?