curtsies-0.2.12/0000755esẀ2s0000000000013240365077020543 5ustar tballingerDROPBOX\Domain Users00000000000000curtsies-0.2.12/curtsies/0000755esẀ2s0000000000013240365077022404 5ustar tballingerDROPBOX\Domain Users00000000000000curtsies-0.2.12/curtsies/__init__.py0000644esẀ2s0000000043113240364676024517 0ustar tballingerDROPBOX\Domain Users00000000000000"""Terminal-formatted strings""" __version__='0.2.12' from .window import FullscreenWindow, CursorAwareWindow from .input import Input from .termhelpers import Nonblocking, Cbreak, Termmode from .formatstring import FmtStr, fmtstr from .formatstringarray import FSArray, fsarray curtsies-0.2.12/curtsies/configfile_keynames.py0000644esẀ2s0000000165313070726761026766 0ustar tballingerDROPBOX\Domain Users00000000000000"""Mapping of config file names of keys to curtsies names In the style of bpython config files and keymap""" SPECIALS = { 'C-[': u'', 'C-^': u'', 'C-_': u'', } #TODO make a precalculated version of this class KeyMap(object): """Maps config file key syntax to Curtsies names""" def __getitem__(self, key): if not key: # Unbound key return () elif key in SPECIALS: return (SPECIALS[key],) elif key[1:] and key[:2] == 'C-': return (u'' % key[2:],) elif key[1:] and key[:2] == 'M-': return (u'' % key[2:], u'' % key[2:],) elif key[0] == 'F' and key[1:].isdigit(): return (u'' % int(key[1:]),) else: raise KeyError('Configured keymap (%s)' % key + ' does not exist in bpython.keys') keymap = KeyMap() curtsies-0.2.12/curtsies/curtsieskeys.py0000644esẀ2s0000000742613240356041025513 0ustar tballingerDROPBOX\Domain Users00000000000000"""All the key sequences""" # If you add a binding, add something about your setup # if you can figure out why it's different # Special names are for multi-character keys, or key names # that would be hard to write in a config file #TODO add PAD keys hack as in bpython.cli CURTSIES_NAMES = dict([ (b' ', u''), (b'\x1b ', u''), (b'\t', u''), (b'\x1b[Z', u''), (b'\x1b[A', u''), (b'\x1b[B', u''), (b'\x1b[C', u''), (b'\x1b[D', u''), (b'\x1bOA', u''), # in issue 92 its shown these should be normal arrows, (b'\x1bOB', u''), # not ctrl-arrows as we previously had them. (b'\x1bOC', u''), (b'\x1bOD', u''), (b'\x1b[1;5A', u''), (b'\x1b[1;5B', u''), (b'\x1b[1;5C', u''), # reported by myint (b'\x1b[1;5D', u''), # reported by myint (b'\x1b[5A', u''), # not sure about these, someone wanted them for bpython (b'\x1b[5B', u''), (b'\x1b[5C', u''), (b'\x1b[5D', u''), (b'\x1b[1;9A', u''), (b'\x1b[1;9B', u''), (b'\x1b[1;9C', u''), (b'\x1b[1;9D', u''), (b'\x1b[1;10A', u''), (b'\x1b[1;10B', u''), (b'\x1b[1;10C', u''), (b'\x1b[1;10D', u''), (b'\x1bOP', u''), (b'\x1bOQ', u''), (b'\x1bOR', u''), (b'\x1bOS', u''), # see bpython #626 (b'\x1b[11~', u''), (b'\x1b[12~', u''), (b'\x1b[13~', u''), (b'\x1b[14~', u''), (b'\x1b[15~', u''), (b'\x1b[17~', u''), (b'\x1b[18~', u''), (b'\x1b[19~', u''), (b'\x1b[20~', u''), (b'\x1b[21~', u''), (b'\x1b[23~', u''), (b'\x1b[24~', u''), (b'\x00', u''), (b'\x1c', u''), (b'\x1d', u''), (b'\x1e', u''), (b'\x1f', u''), (b'\x7f', u''), # for some folks this is ctrl-backspace apparently (b'\x1b\x7f', u''), (b'\xff', u''), (b'\x1b\x1b[A', u''), # uncertain about these four (b'\x1b\x1b[B', u''), (b'\x1b\x1b[C', u''), (b'\x1b\x1b[D', u''), (b'\x1b', u''), (b'\x1b[1~', u''), (b'\x1b[4~', u''), (b'\x1b\x1b[5~',u''), (b'\x1b\x1b[6~',u''), (b'\x1b[H', u''), # reported by amorozov in bpython #490 (b'\x1b[F', u''), # reported by amorozov in bpython #490 (b'\x1bOH', u''), # reported by mixmastamyk in curtsies #78 (b'\x1bOF', u''), # reported by mixmastamyk in curtsies #78 # not fixing for back compat. # (b"\x1b[1~", u''), # find (b"\x1b[2~", u''), # insert (0) (b"\x1b[3~", u''), # delete (.), "Execute" (b"\x1b[3;5~", u''), # not fixing for back compat. # (b"\x1b[4~", u'