MCPcopy Create free account
hub / github.com/Image-Py/imagepy / codeSplit

Function codeSplit

imagepy/ui/pluginloader.py:64–74  ·  view source on GitHub ↗
(txt)

Source from the content-addressed store, hash-verified

62 return buildMenuBar(parent, datas, menuBar)
63
64def codeSplit(txt):
65 sep = txt.split('-')
66 acc, code = wx.ACCEL_NORMAL, -1
67 if 'Ctrl' in sep: acc|= wx.ACCEL_CTRL
68 if 'Alt' in sep: acc|= wx.ACCEL_ALT
69 if 'Shift' in sep: acc|= wx.ACCEL_SHIFT
70 fs = ['F{}'.format(i) for i in range(1,13)]
71 if sep[-1] in fs:
72 code = 340+fs.index(sep[-1])
73 elif len(sep[-1])==1: code = ord(sep[-1])
74 return acc, code
75
76def buildShortcut(parent):
77 shortcuts = []

Callers 1

buildShortcutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected