コード例 #1
0
ファイル: test_keyboard.py プロジェクト: vikrant1717/plover
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
コード例 #2
0
ファイル: test_keyboard.py プロジェクト: DanLanglois/plover
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
コード例 #3
0
 def get_actions():
     return Keyboard.get_actions()
コード例 #4
0
 def get_keys():
     return Keyboard.get_keys()
コード例 #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':
コード例 #6
0
ファイル: test_config.py プロジェクト: DanLanglois/plover
 def get_actions():
     return Keyboard.get_actions()
コード例 #7
0
ファイル: test_config.py プロジェクト: DanLanglois/plover
 def get_keys():
     return Keyboard.get_keys()
コード例 #8
0
ファイル: test_config.py プロジェクト: DanLanglois/plover
            {'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,