Question: i am using opencv with python binding

want to get the value of the key pressed with the following code

```
    cv.waitkey(10)

```

it gives -1 when no key is hit and this value if any of the key is hit.

```
   -1
   -1
   -1
   536870939
   -1 
   -1

```

Could anyone help me in this please.

Thanks a lot

Answer: 
```
# While this bug remains unresolved:
if key != -1:
    reactTo( key % 256 ) # Note: NOT 255

```
It works for me:

```
>>> import cv
>>> cv.NamedWindow("keypress", 0)
>>> cv.WaitKey(10000)    #then I click on the new window and press the 'f' key
102
>>> chr(102)
'f'    

```

You need to have an active window.
It seems your issue can be resolved by operating `% 255` on the return value, itsa crazy [bug](https://stackoverflow.com/questions/9172170/python-opencv-cv-waitkey-spits-back-weird-output-on-ubuntu-modulo-256-maps-corre)