From a (very) quick review of the code :
* getVirtualSpace will return False for the main virtual space and True for the second one. So it shouldn't be a problem that it only returns boolean value.
* Don't see why it will return something different if the virtual space button is pressed
I'll have a deeper look into this when I'll have a computer.