# Method GTKSupport.MenuFactory.MenuDef()->assign_shortcut()

Method assign_shortcut

  ``void` assign_shortcut(`string` `sc`)`

Description

  Sets a new shortcut as the current one.

  The shortcut syntax is: m[m[..]]-key, where m is one or more modifier character, and key is the desired key (NOTE: Key must be in the range 0-255 currently, this will hopefully be fixed by the GTK people in the future)

  The modifiers are:

  ``"s"`` | Shift
  ``"c"`` | Control
  ``"a"`` | Modifier 1 (called alt by the GTK people, that's not true, though)
  ``"1"``
  ``"g"`` | Modifier 2 (called altgr by the GTK people, that's not true, though)
  ``"2"``
  ``"m"`` | Modifier 3 (not mapped by the GTK people, meta on _my_ keyboard)
  ``"3"``
  ``"h"`` | Modifier 4 (not mapped by the GTK people, hyper on _my_ keyboard)
  ``"4"``
  ``"u"`` | Modifier 5 (not mapped by the GTK people, super on _my_ keyboard)
  ``"5"``