has Physical Keyboard : Key « User Event « Android






has Physical Keyboard

    
import android.content.Context;
import android.content.res.Configuration;

class Main {
  public static boolean hasPhysicalKeyboard(Context context) {
    int keyboard = context.getResources().getConfiguration().keyboard;
    return keyboard == Configuration.KEYBOARD_QWERTY;
  }

}

   
    
    
    
  








Related examples in the same category

1.Key event listener
2.Example of writing an input method for a soft keyboard.
3.Soft keyboard get Char
4.show hide virtual keyboard
5.Show Keyboard
6.Hide Keyboard
7.intrepret Direction Key