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
wiebe@CARYA
Knight of NI

Figured that out too (also, CTRL+X, S or C doesn't work anymore.). Must be a better way in AHT, but we're getting OT.

 

 

SergioR
Member

At the end I modified as follows to use the numeric keypad - and + keys to be able to do both small step and big step when moving objects.

At the very end of the script, I had to define the same keys to their default behavior, otherwise they stop working as minus and plus sign, just like you pointed out before regarding the space bar.

 

Enjoy NIWeek! 😉

 

; A,S,D, or W object movement in LabVIEW
; (tested in LV2017 on Win7):

; === 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
	NumpadSub & D::Send {Right}
	NumpadSub & A::Send {Left}
	NumpadSub & S::Send {Down}
	NumpadSub & W::Send {Up}
	NumpadAdd & D::Send +{Right}
	NumpadAdd & A::Send +{Left}
	NumpadAdd & S::Send +{Down}
	NumpadAdd & W::Send +{Up}
	NumpadAdd::NumpadAdd
	NumpadSub::NumpadSub
---
SergioR
JoePerkins
Member

I also did the AutoHotkey stuff, but it would be pretty nice to be able to assign the keys natively (any Vim users here?). Also, with AutoHotkey you need to add some weird modifier to the key to work, not ideal.

Best regards,
Néstor

LabVIEW 2017 + Windows 10