Notification that a key transitioned from up to down. The event fires before the HTML renderer processes it.
The ID of the browser generating the event.
Bit flags describing any pressed modifier keys.
The Windows key code for the key event. This value is used by the DOM specification. Sometimes it comes directly from the event (i.e. on Windows) and sometimes it's determined using a mapping function. See Keyboard Codes in samples below for the list of values.
The actual key code generated by the platform.
Indicates whether the event is considered a system key event (see http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details).
The unicode character generated by the keystroke.
Same as character but unmodified by any concurrently-held modifiers (except shift). This is useful for working out shortcut keys.
True if the focus is currently on an editable field on the page. This is useful for determining if standard key events should be intercepted.
Notification that a key transitioned from up to down. The event fires before the HTML renderer processes it.
Visual Basic |
---|
Public Event OnKeyPress( _ ByVal BrowserID As Long, _ ByVal Modifiers As Long, _ ByVal WindowsKeyCode As Long, _ ByVal NativeKeyCode As Long, _ ByVal IsSystemKey As Boolean, _ ByVal EventCharacter As String, _ ByVal UnmodifiedCharacter As String, _ ByVal IsFocusOnEditableField As Boolean _ ) |
The ID of the browser generating the event.
Bit flags describing any pressed modifier keys.
The Windows key code for the key event. This value is used by the DOM specification. Sometimes it comes directly from the event (i.e. on Windows) and sometimes it's determined using a mapping function. See Keyboard Codes in samples below for the list of values.
The actual key code generated by the platform.
Indicates whether the event is considered a system key event (see http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details).
The unicode character generated by the keystroke.
Same as character but unmodified by any concurrently-held modifiers (except shift). This is useful for working out shortcut keys.
True if the focus is currently on an editable field on the page. This is useful for determining if standard key events should be intercepted.
Notification that a key transitioned from up to down.
The event fires before the HTML renderer processes it.
Event transmission from Chromium to ActiveX is asynchronous and event cannot be mutated.
Private Sub WebKitX1_OnKeyPress(ByVal BrowserID As Long, ByVal Modifiers As Long, ByVal WindowsKeyCode As Long, ByVal NativeKeyCode As Long, ByVal IsSystemKey As Boolean, ByVal EventCharacter As String, ByVal UnmodifiedCharacter As String, ByVal IsFocusOnEditableField As Boolean) Dim Zoom As Double If WindowsKeyCode = 116 Then WebKitX1.Reload True End If Select Case EventCharacter ' Set zoom to 100% Case "=": WebKitX1.Zoom = 1 ' Increase zoom by +20% Case "+": Zoom = WebKitX1.Zoom WebKitX1.Zoom = Zoom + 0.2 ' Decrease zoom by -20% Case "-": Zoom = WebKitX1.Zoom WebKitX1.Zoom = Zoom - 0.2 Case "*" WebKitX1.Eval "document.body.style.cssText='transform:scale3d(0.5, 0.5, 0.5);'" End Select End Sub