previous up next     contents index
Next: wxKeymap::IsUsed Up: wxKeymap: wxObject Previous: wxKeymap::HandleMouseEvent

wxKeymap::ImpliesShift

  void ImpliesShift (char *str)

  This function modifies the way keyboard events are matched against key sequence mappings. Calling ImpliesShift("?") means that anything mapped from ``?'' implicitly also requires the Shift key to be down. The modifications of ImpliesShift only affect mappings defined by wxKeymap::MapFunction (section gif) using string patterns, and all shift implications must be defined before mappings.

As an example, consider mapping functions to ``?''. Because ``?'' is a shifted slash on most keyboards, no keyboard event would ever match a non-shifted ``?''. However, a keymap designer would typically want only to specify ``?'' as the mapping state, because there might exist keyboards with a non-shifted ``?'' and the user should be able to just hit ``?'' in that case.

In general, it is a very difficult problem to determine which keyboard characters imply a shift and which do not. Therefore, it is left up to the keymap user to dynamically define which keys imply a shift. An application could pull the shift-implied keys out of a machine-specific configuration file.



PLT