Use this line at the top of your script.
That works only once. After a restart of InDesign shortkeys does not work if the palette window is open.
Look like a focus problem - when an new document is open and the document window is active I can use the shortcuts. When the palette window is active, the shortkey doesn't work.
hm, one way out would be using the palette monitoring the keyboard. But that's a tedious task for all possible shortcuts a user likes to do when working with your ScriptUI window. And even more, if the user defined his own set of shortcut commands or is working with a localized version of InDesign where different shortcuts are in place compared with the international version.
I also see, that using KBSC with InDesign when a platette type of window is open—be in focus or not—is no problem in CS 8.1.0 on Mac OSX. In CC 2015 it is. Did not test this, but it could well be a problem in all CC versions. You already mentioned CC 2014.
So, what do we have here? A "simple" bug? Guess, yes…