# Cmd > [HTML Version](cmd_aui.htm) _cmd _([String](string.htm.md), in) should be set to the command, DLL, keystrokes, object, or internal ID, according to the _mtype_. It is ignored for the submenu (MBF\_SUBMNU) and separator (MNU\_SEP) menu item types. Care should be taken so that your custom menu commands remain contextually compatible with the application. For example, creating a menu item labeled "Help" with cmd = "?" + chr(13) might make sense in the context of a screen or menu which understands that keyboard sequence, but may make no sense in a text editing context where those would simply be ordinary characters. Any of the following strategies might be employed to avoid the problem: • Use menu types MBF\_SHLEXC and MBF\_CMDLIN, since they launch external windows without affecting the current application context. • Disable or delete the menu items when switching to an application context where they no longer apply. This is usually a error prone and tedious to program and thus not highly recommended. • For MBF\_KBD menus, use universal control characters (that may be applicable everywhere, such as VK\_ESC), or pseudo-function keys which are either context-independent or can be ignored by applications that don't recognize them. In either case, use [Virtual Key Symbolic Names](virtualkeysymbolicnames.htm.md) whenever possible, to avoid complications with the handling of literal control characters. (You can also encode them using the ^X notation, (where ^X is interpreted as Ctrl+X, for any character A-Z or \[, \], \\, underline, or another caret). Thus the _cmd_ string "^GA" would be treated as Ctrl+G followed by the letter A, and "Hello^M" would be treated as the word "Hello" followed by a Carriage-Return (Ctrl+M). **Examples** mtype = MBF\_KBD : cmd = "VK\_xF213" \! virtual function key 213 mtype = MBF\_KBD : cmd = "^C" \! Control C (using "^" notation) mtype = MBF\_CMDLIN : cmd = "CALC.EXE" \! launch calculator mtype = MBF\_SHLEXC : cmd = "www.me.com" \! launch browser