本文整理了Java中org.eclipse.swt.widgets.Widget.sendKeyEvent()
方法的一些代码示例,展示了Widget.sendKeyEvent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.sendKeyEvent()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Widget
类名称:Widget
方法名:sendKeyEvent
暂无
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
LRESULT wmIMEChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
Display display = this.display;
display.lastKey = 0;
display.lastAscii = (int)/*64*/wParam;
display.lastVirtual = display.lastNull = display.lastDead = false;
if (!sendKeyEvent (SWT.KeyDown, OS.WM_IME_CHAR, wParam, lParam)) {
return LRESULT.ONE;
}
sendKeyEvent (SWT.KeyUp, OS.WM_IME_CHAR, wParam, lParam);
// widget could be disposed at this point
display.lastKey = display.lastAscii = 0;
return LRESULT.ONE;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Do not report a lead byte as a key pressed.
*/
if (!OS.IsUnicode && OS.IsDBLocale) {
byte lead = (byte) (wParam & 0xFF);
if (OS.IsDBCSLeadByte (lead)) return null;
}
display.lastAscii = (int)/*64*/wParam;
display.lastNull = wParam == 0;
if (!sendKeyEvent (SWT.KeyDown, OS.WM_CHAR, wParam, lParam)) {
return LRESULT.ONE;
}
// widget could be disposed at this point
return null;
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
boolean sendKeyEvent (NSEvent nsEvent, int type) {
if ((state & WEBKIT_EVENTS_FIX) != 0) return true;
Event event = new Event ();
if (!setKeyState (event, type, nsEvent)) return true;
return sendKeyEvent (type, event);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) {
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, event, GdkEventKey.sizeof);
return sendKeyEvent (SWT.KeyDown, gdkEvent) ? 0 : 1;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, event, GdkEventKey.sizeof);
return sendKeyEvent (SWT.KeyDown, gdkEvent) ? 0 : 1;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, event, GdkEventKey.sizeof);
return sendKeyEvent (SWT.KeyDown, gdkEvent) ? 0 : 1;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
int /*long*/ gtk_key_release_event (int /*long*/ widget, int /*long*/ event) {
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, event, GdkEventKey.sizeof);
return sendKeyEvent (SWT.KeyUp, gdkEvent) ? 0 : 1;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam) {
Event event = new Event ();
if (!setKeyState (event, type, wParam, lParam)) return true;
return sendKeyEvent (type, msg, wParam, lParam, event);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
int /*long*/ gtk_key_release_event (int /*long*/ widget, int /*long*/ event) {
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, event, GdkEventKey.sizeof);
return sendKeyEvent (SWT.KeyUp, gdkEvent) ? 0 : 1;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
long /*int*/ gtk_key_release_event (long /*int*/ widget, long /*int*/ event) {
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, event, GdkEventKey.sizeof);
return sendKeyEvent (SWT.KeyUp, gdkEvent) ? 0 : 1;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
LRESULT wmSysChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
Display display = this.display;
display.lastAscii = (int)/*64*/wParam;
display.lastNull = wParam == 0;
/* Do not issue a key down if a menu bar mnemonic was invoked */
if (!hooks (SWT.KeyDown) && !display.filters (SWT.KeyDown)) {
return null;
}
/* Call the window proc to determine whether it is a system key or mnemonic */
boolean oldKeyHit = display.mnemonicKeyHit;
display.mnemonicKeyHit = true;
int /*long*/ result = callWindowProc (hwnd, OS.WM_SYSCHAR, wParam, lParam);
boolean consumed = false;
if (!display.mnemonicKeyHit) {
consumed = !sendKeyEvent (SWT.KeyDown, OS.WM_SYSCHAR, wParam, lParam);
// widget could be disposed at this point
}
consumed |= display.mnemonicKeyHit;
display.mnemonicKeyHit = oldKeyHit;
return consumed ? LRESULT.ONE : new LRESULT (result);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
if (!sendKeyEvent (SWT.KeyUp, OS.WM_KEYUP, wParam, lParam)) {
result = LRESULT.ONE;
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
if (!sendKeyEvent (SWT.KeyDown, OS.WM_SYSKEYDOWN, wParam, lParam)) {
return LRESULT.ONE;
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
display.lastAscii = display.controlKey (display.lastAscii);
if (!sendKeyEvent (SWT.KeyDown, OS.WM_KEYDOWN, wParam, lParam)) {
return LRESULT.ONE;
内容来源于网络,如有侵权,请联系作者删除!