private void remapKey(InputMapUIResource map,int key,int defaultModifier,int nativeModifier){
  KeyStroke defaultKey=KeyStroke.getKeyStroke(key,defaultModifier);
  Object action=map.get(defaultKey);
  KeyStroke nativeKey=KeyStroke.getKeyStroke(key,nativeModifier);
  if (!nativeKey.equals(defaultKey)) {
    map.remove(defaultKey);
    map.put(nativeKey,action);
  }
}

private void remapKey ( InputMapUIResource map , int key , int defaultModifier , int nativeModifier ) { KeyStroke defaultKey = KeyStroke . getKeyStroke ( key , defaultModifier ) ; Object action = map . get ( defaultKey ) ; KeyStroke nativeKey = KeyStroke . getKeyStroke ( key , nativeModifier ) ; if ( ! nativeKey . equals ( defaultKey ) ) { map . remove ( defaultKey ) ; map . put ( nativeKey , action ) ; } }
remap a swing default key binding to a native one , if needed .
