Unknown keycodes in gnome

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Syberic
Prole
Posts: 6
Joined: Fri Oct 09, 2015 10:26 pm

Unknown keycodes in gnome

Post 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?
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Unknown keycodes in gnome

Post 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.
When I write def I mean function.
User avatar
Beelz
Party member
Posts: 234
Joined: Thu Sep 24, 2015 1:05 pm
Location: New York, USA
Contact:

Re: Unknown keycodes in gnome

Post 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

Code: Select all

if self:hasBeer() then self:drink()
else self:getBeer() end
GitHub -- Website
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Unknown keycodes in gnome

Post 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?
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Unknown keycodes in gnome

Post 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.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests