ranger.keyapi
index
/home/hut/work/ranger/ranger/keyapi.py

# Copyright (c) 2009, 2010 hut <hut@lavabit.com>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

 
Modules
       
ranger.gui.widgets.console_mode

 
Classes
       
builtins.object
Wrapper

 
class Wrapper(builtins.object)
     Methods defined here:
__getattr__(self, attr)
__init__(self, firstattr)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
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(...)
intrflush(...)
is_term_resized(...)
isendwin(...)
keyname(...)
killchar(...)
longname(...)
make_abbreviations(command_list)
meta(...)
mouseinterval(...)
mousemask(...)
napms(...)
narg(number_, function_, *args_, **keywords_)
This applies the replace_narg function to the arguments and keywords
and directly runs this function.
 
Example:
def foo(xyz, narg): return hash((xyz, narg))
 
narg(50, foo, 123) == foo(123, narg=50)
newpad(...)
newwin(...)
nl(...)
nocbreak(...)
noecho(...)
nonl(...)
noqiflush(...)
noraw(...)
pair_content(...)
pair_number(...)
putp(...)
qiflush(...)
raw(...)
replace_narg(number, function, args, keywords)
This function returns (args, keywords) with one little change:
if <function> has a named argument called "narg", args and keywords
will be modified so that the value of "narg" will be <number>.
 
def foo(xyz, narg): pass
 
replace_narg(666, foo, (), {'narg': 10, 'xyz': 5})
=> (), {'narg': 666, 'xyz': 5}
 
replace_narg(666, foo, (1, 2), {})
=> (1, 666), {}
reset_prog_mode(...)
reset_shell_mode(...)
resetty(...)
resize_term(...)
resizeterm(...)
savetty(...)
setsyx(...)
setupterm(...)
termattrs(...)
termname(...)
tigetflag(...)
tigetnum(...)
tigetstr(...)
tparm(...)
typeahead(...)
ungetch(...)
ungetmouse(...)
use_default_colors(...)
use_env(...)

 
Data
        ACK = 6
ALLOWED_BOOKMARK_KEYS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`'"
ALL_MOUSE_EVENTS = 134217727
A_ALTCHARSET = 4194304
A_ATTRIBUTES = 4294967040
A_BLINK = 524288
A_BOLD = 2097152
A_CHARTEXT = 255
A_COLOR = 65280
A_DIM = 1048576
A_HORIZONTAL = 33554432
A_INVIS = 8388608
A_LEFT = 67108864
A_LOW = 134217728
A_NORMAL = 0
A_PROTECT = 16777216
A_REVERSE = 262144
A_RIGHT = 268435456
A_STANDOUT = 65536
A_TOP = 536870912
A_UNDERLINE = 131072
A_VERTICAL = 1073741824
BEL = 7
BS = 8
BUTTON1_CLICKED = 4
BUTTON1_DOUBLE_CLICKED = 8
BUTTON1_PRESSED = 2
BUTTON1_RELEASED = 1
BUTTON1_TRIPLE_CLICKED = 16
BUTTON2_CLICKED = 256
BUTTON2_DOUBLE_CLICKED = 512
BUTTON2_PRESSED = 128
BUTTON2_RELEASED = 64
BUTTON2_TRIPLE_CLICKED = 1024
BUTTON3_CLICKED = 16384
BUTTON3_DOUBLE_CLICKED = 32768
BUTTON3_PRESSED = 8192
BUTTON3_RELEASED = 4096
BUTTON3_TRIPLE_CLICKED = 65536
BUTTON4_CLICKED = 1048576
BUTTON4_DOUBLE_CLICKED = 2097152
BUTTON4_PRESSED = 524288
BUTTON4_RELEASED = 262144
BUTTON4_TRIPLE_CLICKED = 4194304
BUTTON_ALT = 67108864
BUTTON_CTRL = 16777216
BUTTON_SHIFT = 33554432
CAN = 24
COLOR_BLACK = 0
COLOR_BLUE = 4
COLOR_CYAN = 6
COLOR_GREEN = 2
COLOR_MAGENTA = 5
COLOR_RED = 1
COLOR_WHITE = 7
COLOR_YELLOW = 3
CR = 13
DC1 = 17
DC2 = 18
DC3 = 19
DC4 = 20
DEL = 127
DLE = 16
EM = 25
ENQ = 5
EOT = 4
ERR = -1
ESC = 27
ETB = 23
ETX = 3
FF = 12
FS = 28
GS = 29
HT = 9
KEY_A1 = 348
KEY_A3 = 349
KEY_B2 = 350
KEY_BACKSPACE = 263
KEY_BEG = 354
KEY_BREAK = 257
KEY_BTAB = 353
KEY_C1 = 351
KEY_C3 = 352
KEY_CANCEL = 355
KEY_CATAB = 342
KEY_CLEAR = 333
KEY_CLOSE = 356
KEY_COMMAND = 357
KEY_COPY = 358
KEY_CREATE = 359
KEY_CTAB = 341
KEY_DC = 330
KEY_DL = 328
KEY_DOWN = 258
KEY_EIC = 332
KEY_END = 360
KEY_ENTER = 343
KEY_EOL = 335
KEY_EOS = 334
KEY_EXIT = 361
KEY_F0 = 264
KEY_F1 = 265
KEY_F10 = 274
KEY_F11 = 275
KEY_F12 = 276
KEY_F13 = 277
KEY_F14 = 278
KEY_F15 = 279
KEY_F16 = 280
KEY_F17 = 281
KEY_F18 = 282
KEY_F19 = 283
KEY_F2 = 266
KEY_F20 = 284
KEY_F21 = 285
KEY_F22 = 286
KEY_F23 = 287
KEY_F24 = 288
KEY_F25 = 289
KEY_F26 = 290
KEY_F27 = 291
KEY_F28 = 292
KEY_F29 = 293
KEY_F3 = 267
KEY_F30 = 294
KEY_F31 = 295
KEY_F32 = 296
KEY_F33 = 297
KEY_F34 = 298
KEY_F35 = 299
KEY_F36 = 300
KEY_F37 = 301
KEY_F38 = 302
KEY_F39 = 303
KEY_F4 = 268
KEY_F40 = 304
KEY_F41 = 305
KEY_F42 = 306
KEY_F43 = 307
KEY_F44 = 308
KEY_F45 = 309
KEY_F46 = 310
KEY_F47 = 311
KEY_F48 = 312
KEY_F49 = 313
KEY_F5 = 269
KEY_F50 = 314
KEY_F51 = 315
KEY_F52 = 316
KEY_F53 = 317
KEY_F54 = 318
KEY_F55 = 319
KEY_F56 = 320
KEY_F57 = 321
KEY_F58 = 322
KEY_F59 = 323
KEY_F6 = 270
KEY_F60 = 324
KEY_F61 = 325
KEY_F62 = 326
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 0x1884110>
version = b'2.2'
wdg = <ranger.keyapi.Wrapper object at 0x1884150>