BigDaddyO

ListView how to identify when Ctrl+v is hit?

3 posts in this topic

I have a listview control with a Context menu to allow users to Right Click > Paste and it inserts data copied from an excel spreadsheet into the listview using ClipGet.

This works great, but my users keep wanting to hit Ctrl+v and I can't seem to find a way to capture that.  Any ideas?

 

I looked at _GUICtrlListView_SetCallBackMask and _GUICtrlListView_GetCallbackMask but it only seems to return 0

 

Thanks,
Mike


Share this post


Link to post
Share on other sites



I'd suggest you do something more simple using HotKeySet, binding Ctrl+V to a func that only does the insert you want if your GUI has focus and does a plain Send() of Ctrl+V otherwise.

Share this post


Link to post
Share on other sites

I generally hate using HotKeySet, but looking at it again in the help file showed the Related function GuiSetAccelerators which was EXACTLY what I needed.

Thanks Radiance for the nudge in the right direction.

    Local $aAccelKeys[1][2] = [["^v", $hPaste]]
    GUISetAccelerators($aAccelKeys)
 


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now