List of usage examples for android.view Menu performShortcut
public boolean performShortcut(int keyCode, KeyEvent event, int flags);
From source file:android.support.v7.internal.app.ToolbarActionBar.java
@Override public boolean onKeyShortcut(int keyCode, KeyEvent ev) { Menu menu = getMenu(); return menu != null ? menu.performShortcut(keyCode, ev, 0) : false; }
From source file:android.support.v7.app.ToolbarActionBar.java
@Override public boolean onKeyShortcut(int keyCode, KeyEvent ev) { Menu menu = getMenu(); if (menu != null) { final KeyCharacterMap kmap = KeyCharacterMap .load(ev != null ? ev.getDeviceId() : KeyCharacterMap.VIRTUAL_KEYBOARD); menu.setQwertyMode(kmap.getKeyboardType() != KeyCharacterMap.NUMERIC); menu.performShortcut(keyCode, ev, 0); }//from ww w . java 2 s. c o m // This action bar always returns true for handling keyboard shortcuts. // This will block the window from preparing a temporary panel to handle // keyboard shortcuts. return true; }