String (int code) { return switch (code) { case KeyEvent.VK_BACK_QUOTE -> "`"; case KeyEvent.VK_SEPARATOR -> ","; case KeyEvent.VK_DECIMAL -> "."; case KeyEvent.VK_SLASH -> "/"; case KeyEvent.VK_BACK_SLASH -> "\\"; case KeyEvent.VK_PERIOD -> "."; case KeyEvent.VK_SEMICOLON -> ";"; case KeyEvent.VK_CLOSE_BRACKET -> "]"; case KeyEvent.VK_OPEN_BRACKET -> "["; case KeyEvent.VK_EQUALS -> "="; default -> { String result = isNativeMacShortcuts() ? MacKeymapUtil.getKeyText(code) : KeyEvent.getKeyText(code); // [vova] this is dirty fix for bug #35092 yield CANCEL_KEY_TEXT.equals(result) ? BREAK_KEY_TEXT : result; } }; }