I apologize. I sent an explanation of the 'bug' but I don't see it in the
mailing list.. so im resending it here:

"The problem is that ISPRINT(c) returns true for key codes like KEY_IC, and
KEY_DC which are 0512 and 0513. So getch returns a string containing only a
one byte char(K and J respectively) instead of the key code. Other keys that
do not work are END, page up and page down.

We could also use something similar to int_chr in numeric.c to check for
printable chars."

Thank you,

giancarlo

-----Original Message-----
From: Yukihiro Matsumoto [mailto:matz / ruby-lang.org] 
Sent: Monday, December 08, 2008 11:27 PM
To: ruby-core / ruby-lang.org
Subject: [ruby-core:20436] Re: Another Patch for curses extension.

Hi,

In message "Re: [ruby-core:20434] Another Patch for curses extension."
    on Tue, 9 Dec 2008 03:14:25 +0900, "Giancarlo F Bellido"
<support / coaxialhost.com> writes:

|This is a patch for the ruby curses extension. It adds a couple of missing
|functions and also it fixes a bug in getch that prevents special keys like
|INSERT or DELETE to be returned when keypad is enabled. There is a problem
|with Unicode characters and key codes returned by getch. 
|
|- Adds TABSIZE variable.
|- Adds use_default_colors function.
|- Fixes Curses.getch and Window::getch.
|- Adds relevant lines to extconf.rb

I merged your patch except for getch "fix".  You have to describe your
"problem" if you want them to be merged as well.

							matz.