From: Hugo V. <hvw...@ya...> - 2005-07-01 20:35:23
|
Hi, The Ruby patches for any of the 2.6.11 versions produce many wrong keycodes. E.g, Ctrl-0, Ctrl-1, Ctrl-9 do nothing Alt-anything produces the anything key only without the hiorder bit, so it looks like a release code for the anything key. In Ruby 2.6.10 Alt-P produces 2 bytes in the buffer: 13:53:09->==================================== 13:53:09->fd = 3 13:53:11->Executed read(3, buf, 129) 13:53:11->Read 2 bytes into buf (1b 70 ) 13:53:11->Pass 1 13:53:11->High order bit of 1b is off: Press 13:53:11->Byte 1 is 1b 13:53:11->keycode 27 press (Alt key) 13:53:11->Pass 2 13:53:11->High order bit of 70 is off: Press 13:53:11->Byte 2 is 70 13:53:11->keycode 112 press (p key) and that translates to Alt held down and p pressed. But in Ruby 2.6.11 you get only one byte out of that read, like this: 14:22:02->fd = 3 14:22:04->Executed read(3, buf, 129) 14:22:04->Read 1 bytes into buf (f0 ) 14:22:04->Pass 1 14:22:04->High order bit of f0 is on: Release 14:22:04->Byte 1 is f0 14:22:04->keycode 112 release (p key) which looks like you released the p key. So people must be using Ruby 2.6.11 with touchscreens, because using a keyboard with any control or meta key is a mess. BTW there is no problem with the vanilla 2.6.11 code. This is kernel code because there is no difference in the user programs that use it. Regards, Hugo Vanwoerkom __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |