ranger.defaults.keys
index
/home/hut/work/ranger/ranger/defaults/keys.py

Syntax for binding keys: bind(*keys, fnc)
 
keys are one or more key-combinations which are either:
* a string
* an integer which represents an ascii code
* a tuple of integers
 
fnc is a function which is called with the CommandArgument object.
 
The CommandArgument object has these methods:
arg.fm: the file manager instance
arg.wdg: the widget or ui instance
arg.n: the number typed before the key combination (if allowed)
arg.keys: the string representation of the used key combination
arg.keybuffer: the keybuffer instance
 
Check ranger.keyapi for more information

 
Modules
       
ranger.gui.widgets.console_mode

 
Functions
       
baudrate(...)
beep(...)
can_change_color(...)
cbreak(...)
color_content(...)
color_pair(...)
curs_set(...)
def_prog_mode(...)
def_shell_mode(...)
delay_output(...)
doupdate(...)
echo(...)
endwin(...)
erasechar(...)
filter(...)
flash(...)
flushinp(...)
getmouse(...)
getsyx(...)
getwin(...)
halfdelay(...)
has_colors(...)
has_ic(...)
has_il(...)
has_key(...)
init_color(...)
init_pair(...)
initialize_commands(command_list)
Initialize the commands for the main user interface
initialize_console_commands(command_list)
Initialize the commands for the console widget only
initialize_embedded_pager_commands(command_list)
initialize_pager_commands(command_list)
initialize_taskview_commands(command_list)
Initialize the commands for the TaskView widget
intrflush(...)
is_term_resized(...)
pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
c{0: 0 (((1 string-address)) <- ((new)) abc) -- nil
c{0: 1 (((2 string-address)) <- ((new)) ) -- nil
c{0: 2 (((3 boolean)) <- ((match-at)) ((1 string-address)) ((2 string-address)) ((4 literal))) -- nil
c{1: 0 ✓ (((1 string-address)) <- ((new)) abc)
c{1: 1 ✓ (((2 string-address)) <- ((new)) )
c{1: 2 ✓ (((3 boolean)) <- ((match-at)) ((1 string-address)) ((2 string-address)) ((4 literal)))
cn0: convert-names in main
cn0: (((1 string-address)) <- ((new)) abc) nil nil
cn0: checking arg abc
cn0: checking oarg ((1 string-address))
maybe-add: ((1 string-address))
cn0: (((2 string-address)) <- ((new)) ) nil nil
cn0: checking arg 
cn0: checking oarg ((2 string-address))
maybe-add: ((2 string-address))
cn0: (((3 boolean)) <- ((match-at)) ((1 string-address)) ((2 string-address)) ((4 literal))) nil nil
cn0: checking arg ((1 string-address))
maybe-add: ((1 string-address))
cn0: checking arg ((2 string-address))
maybe-add: ((2 string-address))
cn0: checking arg ((4 literal))
cn0: checking oarg ((3 boolean))
maybe-add: ((3 boolean))
cn1: (((1 string-address)) <- ((new)) abc)
cn1: (((2 string-address)) <- ((new)) )
cn1: (((3 boolean)) <- ((match-at)) ((1 string-address)) ((2 string-address)) ((4 literal)))
schedule: main
run: main 0: (((1 string-address)) <- ((new)) abc)
run: main 0: 1000 => ((1 string-address))
mem: ((1 string-address)): 1 <= 1000
run: main 1: (((2 string-address)) <- ((new)) )
run: main 1: 1004 => ((2 string-address))
mem: ((2 string-address)): 2 <= 1004
run: main 2: (((3 boolean)) <- ((match-at)) ((1 string-address)) ((2 string-address)) ((4 literal)))
mem: ((1 string-address)) => 1000
mem: ((2 string-address)) => 1004
run: match-at/main 0: (((default-space space-address)) <- ((new)) ((space literal)) ((30 literal)))
run: match-at/main 0: 1005 => ((default-space space-address))
run: match-at/main 1: (((1 string-address)) <- ((next-input)))
arg: nil 0 (1000 1004 4)
run: match-at/main 1: 1000 => ((1 string-address))
mem: ((1 string-address)): 1007 <= 1000
run: match-at/main 2: (((2 string-address)) <- ((next-input)))
arg: nil 1 (1000 1004 4)
run: match-at/main 2: 1004 => ((2 string-address))
mem: ((2 string-address)): 1008 <= 1004
run: match-at/main 3: (((3 integer)) <- ((next-input)))
arg: nil 2 (1000 1004 4)
run: match-at/main 3: 4 => ((3 integer))
mem: ((3 integer)): 1009 <= 4
run: match-at/main 4: (((4 integer)) <- ((length)) ((2 string-address) (deref)))
array-len: ((2 string-address) (deref))
mem: ((1004 integer) (raw)) => 0
run: match-at/main 4: 0 => ((4 integer))
mem: ((4 integer)): 1010 <= 0
run: match-at/main 5: (((5 integer)) <- ((length)) ((1 string-address) (deref)))
array-len: ((1 string-address) (deref))
mem: ((1000 integer) (raw)) => 3
run: match-at/main 5: 3 => ((5 integer))
mem: ((5 integer)): 1011 <= 3
run: match-at/main 6: (((5 integer)) <- ((subtract)) ((5 integer)) ((4 integer)))
mem: ((5 integer)) => 3
mem: ((4 integer)) => 0
run: match-at/main 6: 3 => ((5 integer))
mem: ((5 integer)): 1011 <= 3
run: match-at/main 7: (((6 boolean)) <- ((lesser-or-equal)) ((3 integer)) ((5 integer)))
mem: ((3 integer)) => 4
mem: ((5 integer)) => 3
run: match-at/main 7: nil => ((6 boolean))
mem: ((6 boolean)): 1012 <= nil
run: match-at/main 8: (((jump-if)) ((6 boolean)) ((1 offset)))
mem: ((6 boolean)) => nil
run: match-at/main 9: (((reply)) ((nil literal)))
run: main 2: nil => ((3 boolean))
mem: ((3 boolean)): 3 <= nil
schedule: done with routine nil

>KEY_F63 = 327
KEY_F7 = 271
KEY_F8 = 272
KEY_F9 = 273
KEY_FIND = 362
KEY_HELP = 363
KEY_HOME = 262
KEY_IC = 331
KEY_IL = 329
KEY_LEFT = 260
KEY_LL = 347
KEY_MARK = 364
KEY_MAX = 511
KEY_MESSAGE = 365
KEY_MIN = 257
KEY_MOUSE = 409
KEY_MOVE = 366
KEY_NEXT = 367
KEY_NPAGE = 338
KEY_OPEN = 368
KEY_OPTIONS = 369
KEY_PPAGE = 339
KEY_PREVIOUS = 370
KEY_PRINT = 346
KEY_REDO = 371
KEY_REFERENCE = 372
KEY_REFRESH = 373
KEY_REPLACE = 374
KEY_RESET = 345
KEY_RESIZE = 410
KEY_RESTART = 375
KEY_RESUME = 376
KEY_RIGHT = 261
KEY_SAVE = 377
KEY_SBEG = 378
KEY_SCANCEL = 379
KEY_SCOMMAND = 380
KEY_SCOPY = 381
KEY_SCREATE = 382
KEY_SDC = 383
KEY_SDL = 384
KEY_SELECT = 385
KEY_SEND = 386
KEY_SEOL = 387
KEY_SEXIT = 388
KEY_SF = 336
KEY_SFIND = 389
KEY_SHELP = 390
KEY_SHOME = 391
KEY_SIC = 392
KEY_SLEFT = 393
KEY_SMESSAGE = 394
KEY_SMOVE = 395
KEY_SNEXT = 396
KEY_SOPTIONS = 397
KEY_SPREVIOUS = 398
KEY_SPRINT = 399
KEY_SR = 337
KEY_SREDO = 400
KEY_SREPLACE = 401
KEY_SRESET = 344
KEY_SRIGHT = 402
KEY_SRSUME = 403
KEY_SSAVE = 404
KEY_SSUSPEND = 405
KEY_STAB = 340
KEY_SUNDO = 406
KEY_SUSPEND = 407
KEY_UNDO = 408
KEY_UP = 259
LF = 10
NAK = 21
NARG_KEYWORD = 'narg'
NL = 10
NUL = 0
OK = 0
RANGERDIR = '/home/hut/work/ranger/ranger'
REPORT_MOUSE_POSITION = 134217728
RS = 30
SI = 15
SO = 14
SOH = 1
SP = 32
STX = 2
SUB = 26
SYN = 22
TAB = 9
US = 31
VT = 11
controlnames = ['NUL', 'SOH', 'STX', 'ETX', 'EOT', 'ENQ', 'ACK', 'BEL', 'BS', 'HT', 'LF', 'VT', 'FF', 'CR', 'SO', 'SI', 'DLE', 'DC1', 'DC2', 'DC3', ...]
fm = <ranger.keyapi.Wrapper object at 0x20084d0>
version = b'2.2'
wdg = <ranger.keyapi.Wrapper object at 0x2008510>