Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / How to get the key pressed like string
- - By Andrek Date 2015-07-22 11:48
Hi! i want know which key is pressed but like string, like STDIN.gets(), i'm using this code:

def button_down(key)
char = (key + 93).chr
end


That work only with letters but no space key and numbers.

It's for my TextInput class no Gosu's TextInput. Please help me i dont want define each key.
Parent - - By lol_o2 Date 2015-07-22 12:16
Try Gosu.button_id_to_char(id)
Parent - By Andrek Date 2015-07-22 12:40
Thanks you!!!! it's work
Up Topic Gosu / Gosu Exchange / How to get the key pressed like string

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill