Author Topic: Xubuntu [xfce] - Keyboard: Ctrl-Function Keys do not seem to work  (Read 9554 times)

deadimp

  • Guest
I've installed Code::Blocks on Xubuntu 6.10 (running the version of xfce bundled with it), and for some reason, certain key combinations do not work.
I've been trying to compile a simple file and run it, and I found that F9 works, but simply Ctrl-F9 / Ctrl-F10 does not. When I tried to set the shortcut in the menu, whenever I pressed any Ctrl-Function key combo, it wouldn't register both of the keys.
I haven't checked to see if it's a problem with xfce itself, or CB handling the keys. I will check that now.

Edit: I've just tested the key combo on xfce's Keyboard Preferences, and it worked.
It might be because Ctrl-F[1-4] activates the corresponding workspace, so it could have that reserved in the system. I haven't looked into how to change that (it's not listed on the Keyboard Shortcuts on Xubuntu).
For a second, I was able to get CB to register Ctrl-F6, but then I wasn't able to after that.
Same thing seems to apply to Alt-Function key...

When I change the terminal's (xfce4-terminal) keyboard shortcuts, it all works.
« Last Edit: March 24, 2007, 03:09:32 pm by deadimp »

deadimp

  • Guest
Re: Xubuntu [xfce] - Keyboard: Ctrl-Function Keys do not seem to work
« Reply #1 on: March 24, 2007, 03:16:45 pm »
I've found the shortcuts that might interfere with these commands (in Window Settings), and I simply removed them (they were for navigating through workspaces).
However, Code::Blocks still doesn't handle Ctrl-F# that well. I've found out that I can set the shortcut by pressing the function key first, and Ctrl right after, but that doesn't work in CB (the function key is interpreted as a separate action).

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Xubuntu [xfce] - Keyboard: Ctrl-Function Keys do not seem to work
« Reply #2 on: March 24, 2007, 04:29:26 pm »
Acknowledging your observation.
I'll have a look at it today.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Xubuntu [xfce] - Keyboard: Ctrl-Function Keys do not seem to work
« Reply #3 on: March 24, 2007, 08:15:41 pm »

...However, Code::Blocks still doesn't handle Ctrl-F# that well. I've found out that I can set the shortcut by pressing the function key first, and Ctrl right after, but that doesn't work in CB (the function key is interpreted as a separate action).

I assigned Ctrl-F2 to Settings/Editor. It work ok for me.

I am unable to re-create this error on "andLinux" or "Ubuntu Edgy".
Could you give me a step-by-step on how to get the error.

deadimp

  • Guest
Re: Xubuntu [xfce] - Keyboard: Ctrl-Function Keys do not seem to work
« Reply #4 on: March 24, 2007, 09:12:03 pm »
I'm not sure whether this error is due to Ubuntu, the session manager, or Code::Blocks. Right now, I'm fairly certain that it has nothing to do really with CB, but rather with the system/session manager 'stealing' the key combo from CB (why they work on other applications is unkown to me).
After reassigning the keys in Windows Manager (under xfce), all of the Ctrl-F# combos are working except for Ctrl-F9 (the one I'd really like to have). The only session-wide keyboard shortcut settings I have looked at is Keyboard Settings, Window Manager Settings, and SCIM Input Method Setup (briefly).
What I'm doing:
Xubuntu 6.10 (I haven't tested it on Ubuntu w/gnome, because the editor [something to do with Scintilla] was way too slow, therefore I didn't go too far into CB then)
Settings > Editor > Keyboard shortcuts, went to Build > Build, tried to enter Ctrl-F9 in the 'New Shortcut' box, but when I press Ctrl first and then F9, all I get is 'Ctrl-', whereas when I press F9 then Ctrl quickly, I get the desired 'Ctrl-F9'. As I said before, Ctrl-F[1-8,10-12] work.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Xubuntu [xfce] - Keyboard: Ctrl-Function Keys do not seem to work
« Reply #5 on: March 24, 2007, 10:32:35 pm »
Settings > Editor > Keyboard shortcuts, went to Build > Build, tried to enter Ctrl-F9 in the 'New Shortcut' box, but when I press Ctrl first and then F9, all I get is 'Ctrl-', whereas when I press F9 then Ctrl quickly, I get the desired 'Ctrl-F9'. As I said before, Ctrl-F[1-8,10-12] work.

I just tried Ctrl-F9 on Build/Build. Also tried just F9. That worked also.
It looks like something is stealing your F9 key. KeyBinder sees the Ctrl- but not the F9, it just stupidly sits there waiting for the next shoe to drop.