I am looking for an easy way to cancel keyboard,
when some keys that I choose are pressed.
In other words, i am looking for the way to
write "null" when i am pressing a character key.
Do you have an idea to do this ?
Code: Select all
'Intercepter l'appui sur une touche
Sub KeyPressed_original(Event As Object)
Dim Msg As String
Select Case Event.KeyCode
Case com.sun.star.awt.Key.RETURN
Msg = "Return pressed"
Case com.sun.star.awt.Key.TAB
Msg = "Tab pressed"
Case com.sun.star.awt.Key.DELETE
Msg = "Delete pressed"
Case com.sun.star.awt.Key.ESCAPE
Msg = "Escape pressed"
Case com.sun.star.awt.Key.DOWN
Msg = "Down pressed"
Case com.sun.star.awt.Key.UP
Msg = "Up pressed"
Case com.sun.star.awt.Key.LEFT
Msg = "Left pressed"
Case com.sun.star.awt.Key.RIGHT
Msg = "Right pressed"
Case Else
Msg = "Character " & Event.KeyChar & " entered"
End Select
End Sub
Thanks, guys !