Description
While inspecting and changeing the files:
https://github.com/jupyter-xeus/cpp-terminal/blob/master/cpp-terminal/key.cpp
https://github.com/jupyter-xeus/cpp-terminal/blob/master/cpp-terminal/key.hpp
I noticed the following possible error:
Key::Value::q + MetaKey::Value::Ctrl == Key::Value::Ctrl_Q; // returns false
The addition adds a flag bit at bit position 23
becaulse:
cpp-terminal/cpp-terminal/key.hpp
Line 249 in 83b7300
and:
cpp-terminal/cpp-terminal/key.cpp
Line 22 in 83b7300
so the result will not be Key::Value::Ctrl_Q
cpp-terminal/cpp-terminal/key.hpp
Line 35 in 83b7300
When I enter Ctrl+Q on my keyboard, I would like to intuitively use the library and use Key::Value::q + MetaKey::Value::Ctrl
to check against.
Currently we employ two different schools of thought and mixed and messed them up.
- all controll characters are from 0 to 31
- all controll characters have the 22nd bit set high
and both are being though of as being a controll character. We should choose one of the two. I understand the motivation of the second because it allows for the future feature of seperatelly reading the Ctrl key and storing it in a flag. However, like this the feature of adding metakeys to normal keys is pretty much useless, or am I wrong and missing something? @flagarde