本文整理了Java中android.view.KeyEvent.isAltPressed()
方法的一些代码示例,展示了KeyEvent.isAltPressed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyEvent.isAltPressed()
方法的具体详情如下:
包路径:android.view.KeyEvent
类名称:KeyEvent
方法名:isAltPressed
暂无
代码示例来源:origin: libgdx/libgdx
if (keyCode == android.view.KeyEvent.KEYCODE_BACK && e.isAltPressed()) {
keyCode = Keys.BUTTON_CIRCLE;
event.keyCode = keyCode;
event.type = KeyEvent.KEY_UP;
if (keyCode == android.view.KeyEvent.KEYCODE_BACK && e.isAltPressed()) {
keyCode = Keys.BUTTON_CIRCLE;
event.keyCode = keyCode;
代码示例来源:origin: libgdx/libgdx
if (keyCode == android.view.KeyEvent.KEYCODE_BACK && e.isAltPressed()) {
keyCode = Keys.BUTTON_CIRCLE;
event.keyCode = keyCode;
event.type = KeyEvent.KEY_UP;
if (keyCode == android.view.KeyEvent.KEYCODE_BACK && e.isAltPressed()) {
keyCode = Keys.BUTTON_CIRCLE;
event.keyCode = keyCode;
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode==KeyEvent.KEYCODE_SLASH &&
event.isAltPressed() &&
event.getRepeatCount()==0 &&
Build.VERSION.SDK_INT<=Build.VERSION_CODES.M) {
new ShortcutDialogFragment().show(getSupportFragmentManager(),
"shortcuts");
return(true);
}
return(super.onKeyDown(keyCode, event));
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode==KeyEvent.KEYCODE_SLASH &&
event.isAltPressed() &&
event.getRepeatCount()==0 &&
Build.VERSION.SDK_INT<=Build.VERSION_CODES.M) {
new ShortcutDialogFragment().show(getSupportFragmentManager(),
"shortcuts");
return(true);
}
return(super.onKeyDown(keyCode, event));
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode==KeyEvent.KEYCODE_DPAD_RIGHT && event.getRepeatCount()==0) {
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);
}
}
return(super.onKeyDown(keyCode, event));
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode==KeyEvent.KEYCODE_DPAD_RIGHT && event.getRepeatCount()==0) {
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);
}
}
return(super.onKeyDown(keyCode, event));
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode==KeyEvent.KEYCODE_DPAD_RIGHT && event.getRepeatCount()==0) {
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);
}
}
return(super.onKeyDown(keyCode, event));
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode==KeyEvent.KEYCODE_DPAD_RIGHT && event.getRepeatCount()==0) {
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);
}
}
return(super.onKeyDown(keyCode, event));
}
代码示例来源: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: termux/termux-app
mActivity.removeFinishedSession(currentSession);
return true;
} else if (e.isCtrlPressed() && e.isAltPressed()) {
代码示例来源:origin: termux/termux-app
if (event.isAltPressed()) keyMod |= KeyHandler.KEYMOD_ALT;
if (event.isShiftPressed()) keyMod |= KeyHandler.KEYMOD_SHIFT;
if (!event.isFunctionPressed() && handleKeyCode(keyCode, keyMod)) {
代码示例来源:origin: moagrius/TileView
boolean alt = event.isAltPressed();
if (event.getAction() == KeyEvent.ACTION_DOWN) {
switch (event.getKeyCode()) {
代码示例来源:origin: GeoODK/collect
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (event.isAltPressed() == true) {
return false;
}
return super.onKeyDown(keyCode, event);
}
代码示例来源:origin: GeoODK/collect
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (event.isAltPressed() == true) {
return false;
}
return super.onKeyDown(keyCode, event);
}
代码示例来源:origin: GeoODK/collect
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (event.isAltPressed() == true) {
return false;
}
return super.onKeyDown(keyCode, event);
}
代码示例来源:origin: GeoODK/collect
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (event.isAltPressed() == true) {
return false;
}
return super.onKeyDown(keyCode, event);
}
代码示例来源:origin: derry/delion
private static int getMetaState(KeyEvent event) {
return (event.isCtrlPressed() ? CTRL : 0)
| (event.isAltPressed() ? ALT : 0)
| (event.isShiftPressed() ? SHIFT : 0);
}
代码示例来源:origin: playn/playn
private int mods (KeyEvent event) {
return modifierFlags(event.isAltPressed(), event.isCtrlPressed(), event.isMetaPressed(),
event.isShiftPressed());
}
代码示例来源: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: 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;
}
内容来源于网络,如有侵权,请联系作者删除!