jsk-ros-pkg / jsk_visualization

jsk visualization ros packages
https://github.com/jsk-ros-pkg/jsk_visualization
329 stars 173 forks source link

shift keyboard release issue in jsk_picker_tool ,The KeyRelease inside is not responding #854

Open lidongxu111 opened 2 years ago

lidongxu111 commented 2 years ago

int PickerTool::processKeyEvent(QKeyEvent event, rviz::RenderPanel panel) { // bool processed = false; if (event->type() == QEvent::KeyPress && event->key() == Qt::Key_Shift ) { // shift event->type() == QEvent::KeyPress // if (event->isAutoRepeat()){ // event->ignore(); shiftpressing = true; // processed == true; } else if (event->type() == QEvent::KeyRelease && event->key() == Qt::Key_Shift) { shiftpressing = false; // event->accept(); } cout << "shift_pressing: " << shiftpressing <<endl; return 0; }

k-okada commented 2 years ago

Thank you for report, could you create PR for this?

lidongxu111 commented 2 years ago

I don't know how to create PR, but I can send the complete code to your email, OK?

lidongxu111 commented 2 years ago

Because my knowledge of the code was borrowed from the code

lidongxu111 commented 2 years ago

So, can you help me?