/** * Formats an individual key into a human readable format. This converts the * key into a format similar to Xemacs. * * @param key * The key to format; must not be <code>null</code>. * @return The key formatted as a string; should not be <code>null</code>. */ public String format(final int key) { final IKeyLookup lookup = KeyLookupFactory.getDefault(); if (lookup.isModifierKey(key)) { String formattedName = Util.translateString(RESOURCE_BUNDLE, lookup .formalNameLookup(key), null); if (formattedName != null) { return formattedName; } } return super.format(key).toLowerCase(); }
/** * Formats an individual key into a human readable format. This converts the * key into a format similar to Xemacs. * * @param key * The key to format; must not be <code>null</code>. * @return The key formatted as a string; should not be <code>null</code>. */ @Override public String format(final int key) { final IKeyLookup lookup = KeyLookupFactory.getDefault(); if (lookup.isModifierKey(key)) { String formattedName = Util.translateString(RESOURCE_BUNDLE, lookup .formalNameLookup(key), null); if (formattedName != null) { return formattedName; } } return super.format(key).toLowerCase(); }
/** * Formats an individual key into a human readable format. This converts the * key into a format similar to Xemacs. * * @param key * The key to format; must not be <code>null</code>. * @return The key formatted as a string; should not be <code>null</code>. */ @Override public String format(final int key) { final IKeyLookup lookup = KeyLookupFactory.getDefault(); if (lookup.isModifierKey(key)) { String formattedName = Util.translateString(RESOURCE_BUNDLE, lookup .formalNameLookup(key), null); if (formattedName != null) { return formattedName; } } return super.format(key).toLowerCase(); }