LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 

Use WASD keys to move front panel/block diagram objects

Status: New

Like some LabVIEW users, I prefer a right-hand-mouse, left-hand-keyboard approach to development.  I find that my left hand is in one of two positions when I'm developing:

 

Position 1: Home row

Useful for quick drop shortcuts, Ctrl-Shift-A for alignment, Ctrl-d for distribute, Tab, Alt, Shift, Ctrl and Space

 

Position 2: Arrow buttons

Useful for moving things a pixel or eight (with shift) at a time

 

To avoid moving to Position 2, I propose using the time-honored gaming tradition of the WASD keys as an alternative to the arrow keys.  These keys and their Shift-ed counterparts currently have no default use when out of an entry field (where arrow keys also behave differently).

wasd.jpg

13 Comments
RavensFan
Knight of NI

I think using the cursor arrow keys is enough for moving objects.  It is not something that is needed to be done often.

 

I'd find it annoying if I went to start typing something in a control or label, the cursor wasn't in the proper edit mode for some reason, then the objects start moving across the screen as I'm typing.

 

If this idea was implement, I think I'd be spending more time fixing accidental object moves then I would be actually moving the objects intentionally.

Darren
Proven Zealot

Great suggestion! One less thing requiring me to move my left hand over to the right side of my keyboard.

GregSands
Active Participant

@Darren - sounds like you need a left-handed keyboard.

Danny_Funk
Member

I thought I'd post here since I almost posted a new similar idea for something that already exists.

 

I commonly use the arrow keys to make sure that my object movements are perfectly horizontal or vertical. Then half of the time that move distance isn't a huge concern, I just need a little extra room. I finally found out that LabVIEW do have the ability to move items perfectly horiztonal or vertical with the mouse. You just need to hit the shift key before you click down the mouse to begin dragging an object. Hitting the shift key after begining a movement doesn't have any effect.

 

I was used to Microsoft products where hitting the shift key after starting a move can toggle back and forth between perfectly horizontal/vertical and diagonal movements.

 

Hopefully this helps you keep your hands in position 1 more often if you didn't know about the shift+drag movement.

Danny Funk -- Senior Group Manager -- Software R&D -- NI
SergioR
Member

Even if not by default, but having the option to enable such use model would be great for me. In addition to having to switch from positions 1 and 2 frequently, I often find that I spend considerable time in position 2 (left hand on arrows, right hand on mouse) while cleaning/arranging stuff, and this is very bad for my posture: body leaning forward and slightly twisted to the right. Bad for office ergonomics.

---
SergioR
wiebe@CARYA
Knight of NI

As a temporary workaround\hack, you can use AutoHotKey.

 

Spoiler

 

The following script uses Space+A, S, W, Z to move the window:

 

Spoiler

 

; Space + A,S,W or Z window movement in LabVIEW
; (tested in LV2013 on Win10):
; === Don't change anything if no LabVIEW window in focus === #NoEnv SendMode Input ; === Change behavior for LabVIEW windows === #IfWinActive ahk_class LVDChild ControlGetFocus, OutputVar if !ErrorLevel Space & S::Send {WheelRight} Space & A::Send {WheelLeft} Space & Z::Send {WheelDown} Space & W::Send {WheelUp}

The space is needed because there is no easy way (I know of) to detect if a control captured the cursor.

 

You can add:

NumpadSub::Send ^{WheelUp}
NumpadAdd::Send ^{WheelDown}

to add CTRL+Scroll up, down. Convenient for jumping though multi frame structures (event, case, sequence). Doesn't work perfectly, but a time saver for me, as my pen input does not have a mouse wheel.

 

SergioR
Member

Hey Wiebe, thanks for the workaround.

 

I actually wanted to move stuff, so I would simply replace "WheelRight" with "Right", and so on. I am using a regular mouse, so the scrolling is not a problem for me, but I definitely see a lot of potential in AutoHotKey.

 

Thanks,

Sergio

---
SergioR
wiebe@CARYA
Knight of NI

OK, missed that about moving, but that's probably even easier. AHK is great, even though I'm using only <1% of it's capacity.

wiebe@CARYA
Knight of NI

More OT.. BTW: In my script, add  "Space::Send {Space}" to the handled keys, or apparently you won't be able to type space in strings...

SergioR
Member

That is right. I also added:

Ctrl & Space::Send ^{Space}

Otherwise I am not able to launch the Quick Drop menu. I might choose to use another key instead of Space, haha.

---
SergioR