Page 1 of 1

Unknown keycodes in gnome

Posted: Fri Oct 23, 2015 9:12 am
by Syberic
So the problem is love.keypressed cant register any key in gnome.
When i do

Code: Select all

print(key)
inside

Code: Select all

love.keypressed(key)
callback it outputs unknown if i press any literal key.
Any way to fix it?

Re: Unknown keycodes in gnome

Posted: Fri Oct 23, 2015 11:02 am
by kikito
I think you should add more information here. Are you using ubuntu? what version? If not, how did you install LÖVE? Which version of LÖVE do you have? Is your keyboard special in any way?. That kind of thing.

Re: Unknown keycodes in gnome

Posted: Fri Oct 23, 2015 1:02 pm
by Beelz
Your problem may be with Gnome. Really, I'm not sure... Never used it, but without it I can read keys fine.

Code: Select all

function love.keypressed(k)
	print(k)
end

Re: Unknown keycodes in gnome

Posted: Fri Oct 23, 2015 1:43 pm
by bobbyjones
I don't think it has to do with gnome. I've used gnome ubuntu with no issues. Maybe it has to do with your keyboard?

Re: Unknown keycodes in gnome

Posted: Fri Oct 23, 2015 1:43 pm
by zorg
You probably don't mean "literal", rather something else; the most important question would be what layout are you using, something other then US-english?
Because iirc in 0.9.x, keycodes for non-us keyboard keys like accented ones and the like won't map to anything because SDL keycodes are only for those; everything else is mapped to unknown.
In 0.10, you'll be able to use scancodes instead, which usually correspond to the mechanical layout, so pressing á (on a hungarian keyboard, for example) will hopefully register as the scancode for " ' ", if i remember correctly.