Opened 11 years ago

Closed 5 years ago

#2200 closed defect (worksforme)

Function keys not working inside the game

Reported by: antoniovazquezblanco Owned by:
Priority: Should Have Milestone:
Component: Core engine Keywords:
Cc: againsttcpa84@… Patch:

Description (last modified by historic_bruno)

If the game is running function keys cannot be used. For example if inside the game and want to turn the volume down and I press Fn+F8 it doesn't happen anything and it is annoying to have to get out of it for doing that simple task.

Change History (8)

comment:1 by Michael, 11 years ago

I can confirm this bug with a Lenovo Thinkpad E530 and Ubuntu Linux 12.10.

As a workaround, I switch from fullscreen mode to windowed mode by pressing 'Alt + Enter'. In windowed mode, my function keys work fine.

comment:2 by Michael, 11 years ago

Cc: againsttcpa84@… added

comment:3 by Marcio, 11 years ago

Don't happens in sony VAIO.

comment:4 by Michael, 11 years ago

Indeed, I was mistaken, but the problem is still there. My Lenovo E530 has twelve "special" keys instead of the traditional F1 - F12 keys. The F[1-12] keys can be reached by pressing 'Fn' + one of those special keys.

Now with 0 A.D. in fullscreen,

  • all F[1-12] keys work fine (screenshot, statistics, etc.)
  • some special keys work fine, like increase/decrease screen brightness, wifi on/off
  • however, the special keys for mute, volume up/down, next/previous and play/pause song have no effect. Especially volume up/down would be very important.

Besides Unity in Ubuntu 12.10, I tested also Gnome, KDE, and Cinnamon to no avail.

In two weeks I will upgrade to Ubuntu 13.10 and report here if there is any improvement.

comment:5 by sanderd17, 11 years ago

Can you check if this also happens with other fullscreen apps? I think fullscreen apps take all the keys from the DE.

comment:6 by Michael, 11 years ago

@sanderd17: yep, you seem to be right. I am not really a gamer so I have not come across this issue with fullscreen apps (there is a difference between "fake" fullscreen apps like video-players and "real" fullscreen apps like games...).

Broken volume buttons are sadly a well known reality since many years for a lot of fullscreen games in Linux :-( The corresponding bug report for Ubuntu brings in the discussion from a freedesktop.org bug report where someone says:

"In window mode games are not exceptions: all events are dispatched to them by window manager. But when game goes full screen window manager occasionally looses ability to handle any keyboard events (as far as all input events). This is well known libSDL 1.2 issue which is going to be fixed in 2.0 major release. There are also some workarounds for this issue."

Ubuntu 12.04, 12.10, and 13.04 use libSDL 1.2, whereas Ubuntu 13.10 (to be released soon) includes also libSDL 2.0. I do not know if 0 A.D would automatically benefit from libSDL 2.0 or if its code needs to be ported. A migration guide in the SDL wiki explains that keyboard input has changed somehow...

Bottom line: if I got that right, the broken volume buttons are not 0 A.D.'s fault, but rather a limitation from SDL 1.2 which was hopefully lifted in SDL 2.0. libSDL 2.0 however is only available in Ubuntu 13.10 and 0 A.D. needs to be ported to this new version.

EDIT: for the sake of completeness, here is the SDL 2 thread in the forum and the SDL 2 support ticket in trac.

Last edited 11 years ago by Michael (previous) (diff)

comment:7 by Imarok, 5 years ago

Component: UI & SimulationCore engine

Move tickets to their correct component.

comment:8 by historic_bruno, 5 years ago

Description: modified (diff)
Milestone: Backlog
Resolution: worksforme
Status: newclosed

We switched to SDL2 long ago.

Tested on Ubuntu 18.04, multimedia keys work correctly in fullscreen mode. Please reopen if anyone else still experiences this in 2019 or beyond.

Note: See TracTickets for help on using tickets.