本文整理了Java中android.view.KeyEvent.isMetaPressed()
方法的一些代码示例,展示了KeyEvent.isMetaPressed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyEvent.isMetaPressed()
方法的具体详情如下:
包路径:android.view.KeyEvent
类名称:KeyEvent
方法名:isMetaPressed
暂无
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (event.getRepeatCount()==0) {
if (keyCode==KeyEvent.KEYCODE_DPAD_RIGHT) {
int position=adapter.getCheckedPosition();
if (position>=0) {
Uri videoUri=adapter.getVideoUri(position);
if (event.isAltPressed()) {
playVideo(videoUri);
}
else if (event.isCtrlPressed()) {
showLargeThumbnail(videoUri);
}
return(true);
}
}
else if (keyCode==KeyEvent.KEYCODE_SLASH &&
event.isMetaPressed() &&
Build.VERSION.SDK_INT<Build.VERSION_CODES.N) {
new ShortcutDialogFragment().show(getSupportFragmentManager(),
"shortcuts");
return(true);
}
}
return(super.onKeyDown(keyCode, event));
}
代码示例来源:origin: playn/playn
private int mods (KeyEvent event) {
return modifierFlags(event.isAltPressed(), event.isCtrlPressed(), event.isMetaPressed(),
event.isShiftPressed());
}
代码示例来源:origin: com.googlecode.playn/playn-android
private Modifiers extractModifiers(KeyEvent nativeEvent) {
Modifiers modifiers = new Modifiers();
if (nativeEvent.isAltPressed()) modifiers.add(Key.ALT);
if (nativeEvent.isCtrlPressed()) modifiers.add(Key.CONTROL);
if (nativeEvent.isShiftPressed()) modifiers.add(Key.SHIFT);
if (nativeEvent.isMetaPressed()) modifiers.add(Key.META);
return modifiers;
}
代码示例来源:origin: threerings/playn
private Modifiers extractModifiers(KeyEvent nativeEvent) {
Modifiers modifiers = new Modifiers();
if (nativeEvent.isAltPressed()) modifiers.add(Key.ALT);
if (nativeEvent.isCtrlPressed()) modifiers.add(Key.CONTROL);
if (nativeEvent.isShiftPressed()) modifiers.add(Key.SHIFT);
if (nativeEvent.isMetaPressed()) modifiers.add(Key.META);
return modifiers;
}
代码示例来源:origin: KDE/kdeconnect-android
if (event.isMetaPressed()) {
np.set("super", true);
modifier = true;
代码示例来源:origin: Calsign/APDE
boolean meta = event.isMetaPressed();
boolean func = event.isFunctionPressed();
内容来源于网络,如有侵权,请联系作者删除!