Closed GoogleCodeExporter closed 9 years ago
As far as I see, all loops before first print and flush are finite loops, so I
have
absolutely no idea why it hangs.
logkeys has been reported working (!) with a USB keyboard, and regardless I
don't see
how that would play any role here.
If anyone can confirm or shed any light on this matter, please do. :)
Or else I'll just have to try it on slackware myself...
Original comment by kernc...@gmail.com
on 18 Jan 2010 at 12:16
I am seeing the exact same behavior with an Ubuntu 9.10 64-bit system (dual
core), not
using a USB keyboard:
Linux 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 02:39:34 UTC 2010 x86_64
GNU/Linux
Could the problem be 64-bit related? Let me know if there is anything I can
test or
provide more info.
Original comment by unspecif...@gmail.com
on 22 Feb 2010 at 1:47
I was able to fix this on my system with the following changes:
(1)
dumpkeys -n | grep '^\\([[:space:]]sh
ift[[:space:]]\\)*\\([[:space:]]altgr[[:space:]]\\)*keycode'
was not returning anything on my system. Reverting to the 'old' dumpkeys
command
string referenced in the comment in the code worked.
(2) the while loop following line.find just a few lines down from the dump was
looping forever. Changing the cast on index to be (std::string::size_type)
resolved
this for me.
With these 2 changes this seems to be working for me.
Original comment by unspecif...@gmail.com
on 23 Feb 2010 at 2:19
Regarding (1), could you please run
sudo dumpkeys -n | grep
'^\([[:space:]]shift[[:space:]]\)*\([[:space:]]altgr[[:space:]]\)*keycode'
command in your terminal. (The double backslash in code produces a single
backslash
when executed.) Is there any output? I suppose there must be, otherwise program
would
never reach (2).
Thanks for your valuable effort! :)
Original comment by kernc...@gmail.com
on 23 Feb 2010 at 12:33
Yes, you are correct, the dumpkeys command does in fact return information. I
must
have originally done something wrong in testing. It is working fine for me
with just
the size_type cast for index. I think it was probably fine for 32 bit but
broken on
64:
user@host:~/src/logkeys-0.1.0/src$ diff -u logkeys.cc.org logkeys.cc
--- logkeys.cc.org 2010-02-23 23:39:32.000000000 -0500
+++ logkeys.cc 2010-02-23 23:42:17.000000000 -0500
@@ -305,7 +305,7 @@
// replace any U+#### with 0x#### for easier parsing
index = line.find("U+", 0);
- while ((unsigned int) index != std::string::npos) {
+ while ((std::string::size_type) index != std::string::npos) {
line[index] = '0'; line[index + 1] = 'x';
index = line.find("U+", index);
}
Original comment by unspecif...@gmail.com
on 24 Feb 2010 at 4:48
The issue is confirmed fixed thanks to unspecified.user.account (interesting
name
there, btw).
Fix committed as r25.
Original comment by kernc...@gmail.com
on 25 Feb 2010 at 4:07
Original comment by kernc...@gmail.com
on 25 Feb 2010 at 4:09
Issue 20 has been merged into this issue.
Original comment by kernc...@gmail.com
on 7 May 2010 at 9:15
Original issue reported on code.google.com by
draconis...@gmail.com
on 11 Jan 2010 at 6:51