thank you Terry

On Dec 13, 2006, at 3:08 PM, Terry Ford wrote:


On Dec 13, 2006, at 11:08 AM, Michael wrote:

Is this acceptible in a keydown event of a listbox that I do not wish the user to be able to paste into? I am writing this for windows and Mac

#If TargetWin32
s= Ctrl+V
#ElseIf TargetMacOS
s=Cmd+V
#End if

if key=s then
return true
end if

No. This is because the Keydown event only returns the "Key" value of non-modifier keys. You must check for the Modifier first using the properties in the Keyboard Module before you check for the Keydown "Key".

Function KeyDown(Key As String) As Boolean

  #If TargetWin32
    If Keyboard.AsyncControlKey Then
      If key="v" Then Return True
    End If
  #Elseif TargetMacOS
    If Keyboard.AsyncOSKey Then // was Keyboard.AsyncCommandKey
      If key="v" Then Return True
    End If
  #EndIf

End Function


This (or something similar) should work for the shortcut keys.

Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to