# Path: ranger.py
# ARGV = sys.argv[1:sys.argv.index('--')] if '--' in sys.argv else sys.argv[1:]


import sys
import copy
import curses.ascii
    import doctest
from ranger import PY3
    'gt': ord('>'),
}

very_special_keys = {  # pylint: disable=invalid-name
    'any': ANYKEY,
    'alt': ALT_KEY,
    'bg': PASSIVE_ACTION,
    'allow_quantifiers': QUANT_KEY,
}


def special_keys_init():
    for key, val in tuple(special_keys.items()):
        special_keys['a-' + key] = (ALT_KEY, val)

    for char in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_!{}':
        special_keys['a-' + char] = (ALT_KEY, ord(char))

    for char in 'abcdefghijklmnopqrstuvwxyz_':
        special_keys['c-' + char] = ord(char) - 96

    special_keys['c-space'] = 0

    for n in range(64):
        special_keys['f' + str(n)] = curses.KEY_F0 + n


special_keys_init()

special_keys.update(very_special_keys)

# Path: ranger.py
# ARGV = sys.argv[1:sys.argv.index('--')] if '--' in sys.argv else sys.argv[1:]


# Path: ranger/ext/keybinding_parser.py
import sys
import copy
import curses.ascii
    import doctest
from ranger import PY3

    'gt': ord('>'),
}

very_special_keys = {  # pylint: disable=invalid-name
    'any': ANYKEY,
    'alt': ALT_KEY,
    'bg': PASSIVE_ACTION,
    'allow_quantifiers': QUANT_KEY,
}


def special_keys_init():
    for key, val in tuple(special_keys.items()):
        special_keys['a-' + key] = (ALT_KEY, val)

    for char in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_!{}':
        special_keys['a-' + char] = (ALT_KEY, ord(char))

    for char in 'abcdefghijklmnopqrstuvwxyz_':
        special_keys['c-' + char] = ord(char) - 96

    special_keys['c-space'] = 0

    for n in range(64):
        special_keys['f' + str(n)] = curses.KEY_F0 + n


special_keys_init()

special_keys.update(very_special_keys)

del very_special_keys