Yes, using the 'io/console' library (included in stdlib). it provides, among other things, IO#getch.

require 'io/console'
while char = $stdin.getch
	puts "You pressed '#{char}'!"
end

-- 
Matma Rex