Ask Your Question

waitkey give incorrect input

asked 2018-04-22 01:44:19 -0500

yabokukz gravatar image

when I press specific character it give to me 63. For example i press 'Ә' it must be 1240 but give 63 how i can solve it?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2018-04-22 01:49:50 -0500

berak gravatar image

updated 2018-04-22 01:51:08 -0500

use cv2.waitKeyEx() then.

(cv2.waitKey() does an internal (k & 0xff) masking)

edit flag offensive delete link more


no it also give me 63. when i test " АӘБ123" waitkey give me this values 51 50 49 193 63 192

yabokukz gravatar imageyabokukz ( 2018-04-22 02:00:25 -0500 )edit

hmm, os ? opencv version ? which gui does it use ?

is that russian ?

berak gravatar imageberak ( 2018-04-22 02:01:31 -0500 )edit

windows 10, opencv3.3.1, i use spyder with anaconda 3, no it's kazakh language, it like russian but with added letters

yabokukz gravatar imageyabokukz ( 2018-04-22 02:05:14 -0500 )edit

ok, then i got it wrong, i assumed, you wanted "special" keys, like cursor.

also made a quick test, changing my laptop to kasakh keyboard, and i weirdly get 63 for all of the letters (space is still 32, though). there seem to be some language layouts, which do not return proper scankeys here (assamese, devanagari, yours)

no idea, what to do, sorry.

berak gravatar imageberak ( 2018-04-22 02:37:46 -0500 )edit

ok thak you for your attention!

yabokukz gravatar imageyabokukz ( 2018-04-22 02:43:35 -0500 )edit

Hmm it might be possible that the cyrillic unicode block is not supported by default on your operating system? That could indicate why it is not working.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-04-25 06:38:39 -0500 )edit

Also a problem i see is that for cyrillic, we should have a 0xFFFF instead of 0xFF which is applied now and only works for default latin layout. I am afraid the library is hitting it limits here.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-04-25 06:40:58 -0500 )edit

Question Tools

1 follower


Asked: 2018-04-22 01:44:19 -0500

Seen: 55 times

Last updated: Apr 22 '18