Determine list of names of key modifiers for this platform. The names are used to build Tk bindings -- it doesn't matter if the keyboard has these keys; it matters if Tk understands them. The order is also important: key binding equality depends on it, so config-key
(self)
| 167 | self.toggle_level() |
| 168 | |
| 169 | def set_modifiers_for_platform(self): |
| 170 | """Determine list of names of key modifiers for this platform. |
| 171 | |
| 172 | The names are used to build Tk bindings -- it doesn't matter if the |
| 173 | keyboard has these keys; it matters if Tk understands them. The |
| 174 | order is also important: key binding equality depends on it, so |
| 175 | config-keys.def must use the same ordering. |
| 176 | """ |
| 177 | if sys.platform == "darwin": |
| 178 | self.modifiers = ['Shift', 'Control', 'Option', 'Command'] |
| 179 | else: |
| 180 | self.modifiers = ['Control', 'Alt', 'Shift'] |
| 181 | self.modifier_label = {'Control': 'Ctrl'} # Short name. |
| 182 | |
| 183 | def toggle_level(self): |
| 184 | "Toggle between basic and advanced keys." |