Esempio n. 1
0
def machine(request, capture):
    machine = Keyboard({'arpeggiate': request.param})
    keymap = Keymap(Keyboard.KEYS_LAYOUT.split(),
                    system.KEYS + Keyboard.ACTIONS)
    keymap.set_mappings(system.KEYMAPS['Keyboard'])
    machine.set_keymap(keymap)
    return machine
Esempio n. 2
0
def machine(request, capture):
    machine = Keyboard({'arpeggiate': request.param})
    keymap = Keymap(Keyboard.KEYS_LAYOUT.split(),
                    system.KEYS + Keyboard.ACTIONS)
    keymap.set_mappings(system.KEYMAPS['Keyboard'])
    machine.set_keymap(keymap)
    return machine
Esempio n. 3
0
 def get_actions():
     return Keyboard.get_actions()
Esempio n. 4
0
 def get_keys():
     return Keyboard.get_keys()
Esempio n. 5
0
            {'path': short_path, 'enabled': True}
    assert DictionaryConfig(short_path, False).to_dict() == \
            {'path': short_path, 'enabled': False}
    # Test from_dict creation helper.
    assert DictionaryConfig.from_dict({'path': short_path}) == \
            DictionaryConfig(short_path)
    assert DictionaryConfig.from_dict({'path': full_path, 'enabled': False}) == \
            DictionaryConfig(short_path, False)


if sys.platform.startswith('win32'):
    ABS_PATH = os.path.normcase(r'c:/foo/bar')
else:
    ABS_PATH = '/foo/bar'

DEFAULT_KEYMAP = Keymap(Keyboard.get_keys(),
                        english_stenotype.KEYS + Keyboard.get_actions())
DEFAULT_KEYMAP.set_mappings(english_stenotype.KEYMAPS['Keyboard'])

DEFAULTS = {
    'space_placement':
    'Before Output',
    'start_attached':
    False,
    'start_capitalized':
    False,
    'undo_levels':
    config.DEFAULT_UNDO_LEVELS,
    'log_file_name':
    expand_path('strokes.log'),
    'enable_stroke_logging':
Esempio n. 6
0
 def get_actions():
     return Keyboard.get_actions()
Esempio n. 7
0
 def get_keys():
     return Keyboard.get_keys()
Esempio n. 8
0
            {'path': short_path, 'enabled': True}
    assert DictionaryConfig(short_path, False).to_dict() == \
            {'path': short_path, 'enabled': False}
    # Test from_dict creation helper.
    assert DictionaryConfig.from_dict({'path': short_path}) == \
            DictionaryConfig(short_path)
    assert DictionaryConfig.from_dict({'path': full_path, 'enabled': False}) == \
            DictionaryConfig(short_path, False)


if sys.platform.startswith('win32'):
    ABS_PATH = os.path.normcase(r'c:/foo/bar')
else:
    ABS_PATH = '/foo/bar'

DEFAULT_KEYMAP = Keymap(Keyboard.get_keys(), english_stenotype.KEYS + Keyboard.get_actions())
DEFAULT_KEYMAP.set_mappings(english_stenotype.KEYMAPS['Keyboard'])

DEFAULTS = {
    'space_placement': 'Before Output',
    'start_attached': False,
    'start_capitalized': False,
    'undo_levels': config.DEFAULT_UNDO_LEVELS,
    'log_file_name': expand_path('strokes.log'),
    'enable_stroke_logging': False,
    'enable_translation_logging': False,
    'start_minimized': False,
    'show_stroke_display': False,
    'show_suggestions_display': False,
    'translation_frame_opacity': 100,
    'classic_dictionaries_display_order': False,