about summary refs log tree commit diff stats
path: root/html/108write.subx.html
Commit message (Expand)AuthorAgeFilesLines
* .Kartik Agaram2021-05-181-2/+8
* .Kartik Agaram2021-04-211-4/+4
* .Kartik Agaram2021-03-231-165/+223
* 7476Kartik Agaram2020-12-301-1/+1
* 7162Kartik Agaram2020-11-021-131/+134
* 6958Kartik Agaram2020-10-051-2/+2
* 6631Kartik Agaram2020-07-101-0/+223
06 +0100 committer hut <hut@lavabit.com> 2013-02-10 03:35:27 +0100 replaced tabs with 4 spaces in all python files' href='/akspecs/ranger/commit/doc/print_keys.py?h=v1.9.0&id=d1a1173ddc315f21a3d468f43ac55aa43d31883d'>d1a1173d ^
2bf1362a ^




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
                     







                                                      
 

            

                               
               




                                            
#!/usr/bin/env python
"""
You can use this tool to find out values of keypresses
"""

from curses import *

sep = '; '


@wrapper
def main(w):
    mousemask(ALL_MOUSE_EVENTS)
    mouseinterval(0)
    while True:
        ch = w.getch()
        if ch == KEY_MOUSE:
            w.addstr(repr(getmouse()) + sep)
        else:
            w.addstr(str(ch) + sep)