_plugins/kbd_tag.rb
# Convert unicode modifiers to HTML entities
Convert unicode modifiers to HTML entities
Convert unicode modifiers to HTML entities
def mod_to_ent(use_symbol)
    entities = {
      '⌃' => '&#8963;',
      '⌥' => '&#8997;',
      '⇧' => '&#8679;',
      '⌘' => '&#8984;',
      'Fn' => 'Fn'
    }
    names = {
      '⌃' => 'Control',
      '⌥' => 'Option',
      '⇧' => 'Shift',
      '⌘' => 'Command',
      'Fn' => 'Function'
    }
    if entities.key?(self)
      use_symbol ? entities[self] : names[self]
    else
      self
    end
  end
def mod_to_ent ( use_symbol ) entities = { '⌃' =  ' #8963;', '⌥' =  ' #8997;', '⇧' =  ' #8679;', '⌘' =  ' #8984;', 'Fn' => 'Fn' } names = { '⌃' =  ' ontrol', '⌥' =  ' ption', '⇧' =  ' hift', '⌘' =  ' ommand', 'Fn' => 'Function' } if entities . key? ( self ) use_symbol ? entities [ self ] : names [ self ] else self end end
Convert unicode modifiers to HTML entities
Convert unicode modifiers to HTML entities
use_symbol
<not_specific>