Command+V not detected anywhere except

Why on earth doesn’t command+v event not find it’s way into keydown in textarea control. It’s only detected in valuechanged

what is the purpose of this then : keyboard.AsyncCommandKey used in the keydown event?

It’s being consumed by the Paste menu handler in the window’s assigned MenuBar, most likely. Add a menu handler to your window and name it EditPaste, then you can check the focused control:

Function EditPaste() As Boolean
  if self.Focus = TextArea1 then break
  
  Return True
End Function

EDIT: Well, I say that after testing to make sure, and now it’s being weird on subsequent runs.

1 Like

Here’s an example project showing how to intercept this with a subclass of TextArea.
textarea_paste.xojo_binary_project.zip (5.8 KB)

1 Like

It has no purpose. You don’t use Async in a KeyDown event. Use Keyboard.CommandKey instead. But as Anthony noted, it is being consumed by the control itself, unless you override the menu.

3 Likes