Jump to content


Photo
- - - - -

CTRL+SHIFT+ Shortcuts sometimes not working in LabVIEW


  • Please log in to reply
32 replies to this topic

#1 JackDunaway

JackDunaway

    Very Active

  • Members
  • PipPipPip
  • 208 posts
  • Version:LabVIEW 2012
  • Since:2006

Posted 30 March 2012 - 05:04 AM

CTRL+SHIFT+E (and also CTRL+SHIFT+Z and CTRL+SHIFT+S) shortcuts do not work on a few of my virtual machines. :frusty:
  • Anecdotally, this appears to be limited to LV2011 and up
  • All machines are Parallels 7 virtual machines running on OS X Lion
  • Again, some work, and some don't - all with identical (as far as I can tell) VM keyboard and environment settings
What's interesting: CTRL+SHIFT shortcuts work just fine in other applications on the affected VMs - it's only LabVIEW that does not respond to the CTRL+SHIFT shortcuts. This leads me to believe that the Parallels VM information is a red herring, and that the same problem *might* affect a native Windows installation. Any ideas? :wacko:

Posted Image


#2 JackDunaway

JackDunaway

    Very Active

  • Members
  • PipPipPip
  • 208 posts
  • Version:LabVIEW 2012
  • Since:2006

Posted 23 August 2012 - 02:16 AM

OK, I have verified that CTRL+SHIFT+3 works just fine (That's CTRL+# which toggles grid visibility), yet CTRL+SHIFT+Z et al. still do not work. This would indicate keyboard modifiers are not being eaten by the VM, and that LabVIEW is handling at least one CTRL+SHIFT shortcut.

Why isn't it handling the others?? Am I misconfigured some way?

Can someone just do a sanity check for me on E, S, and Z on a machine running LV2012? Thanks!

Posted Image


#3 Aristos Queue

Aristos Queue

    LV R&D: I write C++/# so you don't have to.

  • Premium Member
  • 2,620 posts
  • Location:Austin, TX
  • Version:LabVIEW 2011
  • Since:2000

Posted 23 August 2012 - 05:07 AM

Work fine for me on Win7 and on Mac 10.6.8.

By the way, you have just made me very happy... I had no idea ctrl+shift+E existed. That is a great shortcut... for everyone else: when you're on a VI, it finds that VI in the project tree.

#4 JackDunaway

JackDunaway

    Very Active

  • Members
  • PipPipPip
  • 208 posts
  • Version:LabVIEW 2012
  • Since:2006

Posted 23 August 2012 - 05:33 AM

I'm on OS X 10.8 - could this be a difference, or is that another red herring?

And yes, CTRL+SHIFT+E makes me happy too, it's been sad not being able to use it :(

Posted Image


#5 GregSands

GregSands

    Very Active

  • Members
  • PipPipPip
  • 145 posts
  • Location:Auckland, New Zealand
  • Version:LabVIEW 2012
  • Since:1996

Posted 23 August 2012 - 08:41 PM

All work fine for me on Win 7/LV 2012. Have you tried remapping the shortcuts in Tools/Options/Menu Shortcuts? In fact, trying to set new shortcuts there will show you whether the keystrokes are getting through to LabVIEW or not.

Edited by GregSands, 23 August 2012 - 08:43 PM.


#6 JackDunaway

JackDunaway

    Very Active

  • Members
  • PipPipPip
  • 208 posts
  • Version:LabVIEW 2012
  • Since:2006

Posted 23 August 2012 - 09:05 PM

Have you tried remapping the shortcuts in Tools/Options/Menu Shortcuts? In fact, trying to set new shortcuts there will show you whether the keystrokes are getting through to LabVIEW or not.


Yes, I have tried remapping here. Things like CTRL+SHIFT+3 (from above, that's CTRL+#) and all punctuation (CTRL++, CTRL+>, etc.) will register just fine in this dialog; it's just the CTRL+SHIFT+Alpha keys that won't register.

Posted Image


#7 Aristos Queue

Aristos Queue

    LV R&D: I write C++/# so you don't have to.

  • Premium Member
  • 2,620 posts
  • Location:Austin, TX
  • Version:LabVIEW 2011
  • Since:2000

Posted 23 August 2012 - 11:50 PM

I doubt it. We would have heard an earful from Urs when he visited at NIWeek if this were affecting Mac OS generally.

#8 JackDunaway

JackDunaway

    Very Active

  • Members
  • PipPipPip
  • 208 posts
  • Version:LabVIEW 2012
  • Since:2006

Posted 24 August 2012 - 01:52 AM

I doubt it. We would have heard an earful from Urs when he visited at NIWeek if this were affecting Mac OS generally.


Granted, I'm having this issue in a Win7 VM, and Urs, more of a purist, says he likes to do things natively on the Mac (when we ate lunch together at NIWeek, he did admit to occasionally using Parallels, but will probably come to this forum and deny that conversation ever happened lest it tarnish his rep :-)

Posted Image


#9 MikaelH

MikaelH

    The 500 club

  • Premium Member
  • 576 posts
  • Location:Sydney
  • Version:LabVIEW 2012
  • Since:1996

Posted 24 August 2012 - 02:10 AM

My Quick Drop Ctrl-Space, also stops working on some computers.
Posted Image

#10 JackDunaway

JackDunaway

    Very Active

  • Members
  • PipPipPip
  • 208 posts
  • Version:LabVIEW 2012
  • Since:2006

Posted 24 August 2012 - 02:52 AM

My Quick Drop Ctrl-Space, also stops working on some computers.


So, if you go to "Tools >> Options >> Menu Shortcuts", does this dialog register CTRL+Space? Also, what's your OS/LabVIEW version?

Posted Image


#11 MikaelH

MikaelH

    The 500 club

  • Premium Member
  • 576 posts
  • Location:Sydney
  • Version:LabVIEW 2012
  • Since:1996

Posted 24 August 2012 - 04:08 AM


So, if you go to "Tools >> Options >> Menu Shortcuts", does this dialog register CTRL+Space? Also, what's your OS/LabVIEW version?

Yes, it's linked to Ctrl+Space, and even if I change it to something else, it doesn't work on the computer that is giving me the problem.
BTW, I didn't dare to bring your Seeded business card into Australia, after a 25 hours flight I didn't want to get cought in custom ;-)
Posted Image

#12 JackDunaway

JackDunaway

    Very Active

  • Members
  • PipPipPip
  • 208 posts
  • Version:LabVIEW 2012
  • Since:2006

Posted 24 August 2012 - 04:31 AM

BTW, I didn't dare to bring your Seeded business card into Australia, after a 25 hours flight I didn't want to get cought in custom ;-)


That was a good call on your part! :lol: Australia and New Zealand are apparently the only two countries in the world where my cards are contraband. "Sorry, mate" :P

Posted Image


#13 JackDunaway

JackDunaway

    Very Active

  • Members
  • PipPipPip
  • 208 posts
  • Version:LabVIEW 2012
  • Since:2006

Posted 03 September 2012 - 11:30 PM

Thanks to Justin for helping me debug this again today - but still no go :(

Things I've tried:
  • Using CTRL+SHIFT+Alpha shortcuts in other applications (Notepad++ works fine)
  • Using CTRL+SHIFT+3 shortcut in LabVIEW works fine (It's just CTRL+SHIFT+Alpha shortcuts that have the prob)
  • Setting all VM settings to a known good VM (via text-diff on settings file within the VM package) (this feels like a red herring)
  • Using the Input VIs in a simple LabVIEW program to see if it can register CTRL+SHIFT+Alpha keypresses; it can
  • Remapping modifiers on the Mac side to act like the CTRL key
  • Swapping keyboards with a traditional Windows keyboard
  • Remapping CTRL+SHIFT+E to be just CTRL+E - then "Show in Project" worked as expected (just a sanity check, to ensure it is indeed a problem with registering the shortcut, not the invoking the action itself)
  • Using every imaginable combo of FN, CTRL, ALT, and CMD
  • Pressing SHIFT+CTRL+E (notice the order)
  • Using the Left and Right Shift keys
  • Removing LabVIEW.ini to let it regenerate
  • Reinstalling a fresh copy of LV2012 32bit
Here's a piece of information that may or may not be germane: when I press CTRL then SHIFT then E, as soon as I hit E the mouse turns from the cross-hair to the panning hand if hovering over the FP or BD, and remains the panning hand as long as I hold down CTRL+SHIFT (I can release E, or keep it help, doesn't matter. And 'E' is any arbitrary key). Also, if I hold down CTRL+SHIFT and then click anywhere, the cursor changes from cross-hair to panning-hand on the first click, and remains the panning hand as long as CTRL+SHIFT is help.

If this were StackOverflow, I'd offer bounty on this problem. :wacko: Any more troubleshooting suggestions??

Posted Image


#14 todd

todd

    Very Active

  • Members
  • PipPipPip
  • 222 posts
  • Location:Seattle
  • Version:LabVIEW 2012
  • Since:2002

Posted 04 September 2012 - 07:30 PM

Perhaps Parallels isn't sending all of the HID Keyboard information to the guest OS.
One way to see may be to use System.Runtime.InteropServices.Marshal.ReadInt32().
I don't know it well enough to post code, though.

#15 JackDunaway

JackDunaway

    Very Active

  • Members
  • PipPipPip
  • 208 posts
  • Version:LabVIEW 2012
  • Since:2006

Posted 04 September 2012 - 08:46 PM

Perhaps Parallels isn't sending all of the HID Keyboard information to the guest OS.


Does this following VI disprove that it's Parallels' fault? Or is this VI using some other keystroke reading mechanism other than the way LabVIEW reads global shortcuts?

Screen Shot 2012-09-04 at 1.42.32 PM.png

**EDIT: By the way, thank you for responding, Todd! I'm still desperately looking for any news avenues to explore to solve this issue.

Edited by JackDunaway, 04 September 2012 - 08:47 PM.

Posted Image


#16 todd

todd

    Very Active

  • Members
  • PipPipPip
  • 222 posts
  • Location:Seattle
  • Version:LabVIEW 2012
  • Since:2002

Posted 05 September 2012 - 12:46 AM

Short answer: I don't know.

That VI calls a LV function called getKeyboardState, which may be an abstraction of Microsoft's DirectInput API. If so, it returns a list of keys that are pressed. But that may be separate from the "Modifier Keys" bitfield in a keyboard report.

Just poking in the dark, here, and drawing a target that someone who knows better will hopefully shoot down :)

#17 rolfk

rolfk

    LabVIEW Aficionado

  • Premium Member
  • 2,045 posts
  • Location:Netherlands
  • Version:LabVIEW 2011
  • Since:1992

Posted 05 September 2012 - 09:36 AM

Short answer: I don't know.

That VI calls a LV function called getKeyboardState, which may be an abstraction of Microsoft's DirectInput API. If so, it returns a list of keys that are pressed. But that may be separate from the "Modifier Keys" bitfield in a keyboard report.

Just poking in the dark, here, and drawing a target that someone who knows better will hopefully shoot down :)


The LabVIEW key handling will definitely not be based on DirectX access but directly work on the events returned by Windows in its internal GetMessage() loop. I haven't seen such an issue yet, but I'm not using Macs much, and definitely not with Parallels. I do use Virtual Box quite regularly but with a Windows host and Windows and Linux guests. Would love a Mac guest too but that is just to much trouble to get working reliably. And those VMs sure can do some weird things when passing down events and other stuff to the guest OS. For instance I can reliably crash my computer completely and without even any BSOD if I startup the Windows 7 64 Bit VM and my host Windows system has been operating for quite some time. After a fresh restart of the host it never crashes.

#18 Yair

Yair

    Extwemely Active

  • Members
  • PipPipPipPipPipPip
  • 2,644 posts
  • Version:LabVIEW 2009
  • Since:2003

Posted 05 September 2012 - 12:29 PM


Does this following VI disprove that it's Parallels' fault?


Not necessarily. From my own battle with keyboard shortcuts, I seem to remember that those VIs and the event structure behaved differently, but I wouldn't swear on it. Try checking the key down event (you'll probably need the modifiers terminal to see those keys).

#19 JackDunaway

JackDunaway

    Very Active

  • Members
  • PipPipPip
  • 208 posts
  • Version:LabVIEW 2012
  • Since:2006

Posted 05 September 2012 - 04:39 PM

Not necessarily. From my own battle with keyboard shortcuts, I seem to remember that those VIs and the event structure behaved differently, but I wouldn't swear on it. Try checking the key down event (you'll probably need the modifiers terminal to see those keys).


You may be onto something here. This is the result I get when pressing CTRL+SHIFT+E:

Screen Shot 2012-09-05 at 9.31.14 AM.png

And here's the snippet in case someone else is able to run on a known-good machine, to compare results:

KeystrokeSpy.png

It's suspicious that in my result above Char is '0' (instead of '69') and VKey is 'Ctrl' (instead of 'ASCII').

Posted Image


#20 todd

todd

    Very Active

  • Members
  • PipPipPip
  • 222 posts
  • Location:Seattle
  • Version:LabVIEW 2012
  • Since:2002

Posted 05 September 2012 - 06:38 PM

Running that VI natively, here, it shows 0x18 - but it also performs the action (This VI in Project). I mentioned DirectX as the way that "Acquire Input Data.vi" probably works within the guest OS as a way for LV to see those inputs. The event structure probably ties in deeper than that. I imagine Parallels injects keys using a driver that is installed in the guest - or somehow uses "SendInput". Either way, it's a very tricky thing to manage. KeyOn and KeyOff need to be sent in such a way to avoid repeating keys, neglecting to send KeyOff can leave stuck keys, etc, etc. One of the Parallels threads mentions trying:

Virtual Machine -> Configure -> Options -> Advanced -> Optimize modifier keys for games. Oh, I have an old Parallels license around somewhere at home - maybe I can play with it tonight.