Hi Dzejrou,
I added a piece of debugging code into term_read() to dump the keyboard
events it reads to a file and got mods = 0x84 when I pressed Left Ctrl+key.
So looks like it works for me.
Do Ctrl+key combinations work for you in Bdsh? E.g. Ctrl+C, Ctrl+V to copy
and paste. If so, you should be getting Ctrl in term_read() as it takes the
events from the same queue as term_get_event() from where it goes to Bdsh.
If Ctrl works for you in Bdsh, it could be a problem with the code you are
using to check for Ctrl modifier. Can you show us / paste it here?
Best regards,
Jiri
---------- Původní e-mail ----------
Od: Jaroslav Jindrák <[email protected]>
Komu: HelenOS development mailing list <[email protected]>
Datum: 18. 12. 2017 13:43:50
Předmět: [HelenOS-devel] Held CTRL modifier not applied in terminal.c
"
Hi,
this question is mainly aimed at Jiri Svoboda as he is the author of most of
the keyboard
input code in HelenOS, but if anybody has any pointers for me, I'd
appreciate your input.
While working on the C++ io system, I was testing this code:
std::string str{};
while (std::cin >> str)
std::cout << str << std::endl;
This is a common way to implement a cat-like behavior as the while loop runs
until
(in most cases) std::cin encounters EOF. However, the current HelenOS does
not provide
me with a way to send EOF to the standard input and so this program would
loop endlessly.
Because of this, I tried to make CTRL+D to send EOF to the standard input by
modifying
the term_read function in uspace/lib/gui/terminal.c . The problem is, both
the LCTRL and RCTRL
(and LALT/RALT for that matter) do not make their way to this function
(while others like
LSHIFT/RSHIFT or NUM_LOCK do). After checking the code of both the termnal
and the
HID server (which does actually set the CTRL flag) I cannot see where the
CTRL flag could be
cleared. Got any ideas (even general ideas for where I should look)?
The part of actually inserting EOF on a key combination is easy (currently
have it mapped
to LSHIFT + NUM1 for testing), it's just the dissappearance of CTRL that
confuses me :)
dzejrou
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel
"_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel