Reputation
143,537
Next tag badge:
1001/1000 score
194/200 answers
Badges
21 202 381
Newest
 Good Answer
Impact
~7.2m people reached

Jan
6
awarded  Nice Answer
Jan
6
revised My keyboard generates spurious events
added 1968 characters in body
Jan
6
answered My keyboard generates spurious events
Jan
6
comment My keyboard generates spurious events
So, you'd want to leave that presentation mode. The issue should probably be reported to the maintainers of xfce4-power-manager as it must be quite annoying indeed.
Jan
6
comment My keyboard generates spurious events
Since 1.5.2, it looks like it fakes key events every now in then when in "presentation mode" to make sure no screen saver kicks in. idle_reset_screen_saver does send a non-assigned 255 keycode.
Jan
6
comment My keyboard generates spurious events
That lsof | xargs grep XTestFakeKeyEvent is to find the code of running applications that use that API to send fake key events. What version of xfce4-power-manager is it?
Jan
6
answered How to use the bash builtin to replace the output of a subshell or function
Jan
6
comment My keyboard generates spurious events
Try sudo lsof -Fn -nPd txt | sed -n '/proc/!s/^n//p' | sort -u | xargs grep -l XTestFakeKeyEvent to see what may be sending those fake key events.
Jan
6
comment My keyboard generates spurious events
sorry, that would be for things that inject keyboard events like xdotool or xte. Not sure what that keycode 255 may be. xmodmap -pke could tell us what it is but I doubt it's a real key. Could it be something like a light sensor daemon that simulates a keypress or anything like that?
Jan
6
awarded  Nice Answer
Jan
5
revised Bash script: split word on each letter
Missing -r to cope with backslashes.
Jan
5
answered Inline debug (xtrace) in scripts
Jan
5
revised Bash script: split word on each letter
many awk implementations need assignment to be a different argument from -v. POSIX requires ;.
Jan
5
comment Bash script: split word on each letter
Note that dd will break multibyte characters, so the output will not be text anymore so the behaviour of sed will be unspecified as per POSIX.
Jan
5
revised Iterate through an array and add new items to the array
added 36 characters in body
Jan
5
revised Iterate through an array and add new items to the array
added 36 characters in body
Jan
5
awarded  Good Answer
Jan
5
awarded  array
Jan
5
comment Bash script: split word on each letter
@jimmij, what do you mean? grep -Po . finds characters (and a combining acute accent following a newline character is invalid), and grep -Po '\X' finds graphem clusters for me. You may need a recent version of grep and/or PCRE for it to work properly (or try grep -Po '(*UTF8)\X')
Jan
5
comment Bash script: split word on each letter
Note that both -o and \n are a GNU extension. <<< is a zsh extension (also available in recent versions of ksh93 and the GNU shell (bash)).