Skip to content

waitKey() fail to capturing arrow key #9901

@thewoz

Description

@thewoz
System information
  • OpenCV => 3.3.0
  • Operating System / Platform => macOS 10.12.6 (Sierra)
  • Compiler => Xcode 9.0.1
  • QT => 5.9.2
Detailed description

waitKey() fail to capturing arrow keys.

Steps to reproduce

Build and run the following code:

#include <cstdio>
#include <cstdlib>

#include <opencv2/opencv.hpp>

 int main (int argc, char * const argv[]) {

      cv::namedWindow("window");

      cv::Mat image(320, 240, CV_8UC3, cv::Scalar(0,0,0));

      cv::imshow("window", image);

      while(1){

           int key = cv::waitKey(0);
    
           printf("DEGUG pressed key %d (%c)\n", key, key);

    }

}

Press some random keys with the window focused and not. At a certain point the arrow keys are no more capturing. It's like a random bug so sometimes the above procedure has to be executed several times.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions