Author Topic: Keyboard shortcuts not working on Debian  (Read 6992 times)

Offline dp_alvarez

  • Single posting newcomer
  • *
  • Posts: 6
Keyboard shortcuts not working on Debian
« on: August 14, 2015, 04:18:55 am »
Hello,

I've tried to start using codeblocks again after some time without coding and noticed the keyboard shortcuts (keybinder) plugin isn't working anymore.
I'm not sure what triggered that problems since it has been a while I don't use codeblocks, don't know if it (or any or its shared libs) has been upgraded by APT.
First problem I noticed was that apparently most (but not all) shortcuts had been reset to default and they failed to load after I set them again. Also, I couldn't open the manager via shortcut keys while editing a document. Pressing a shortcut to set focus to editor and then pressing the shortcut to open the manager worked however.
So I started booted up a clean Debian 8 VM, installed codeblocks from the backports repo, the nightly build from the Jen's Debian repo and compiled codeblocks from the SVN source (one at a time, always on a clean VM) but all of them had the exact same problem.

I found a bug report on the SF tracker but no replies yet, so I'm posting here. The log attached to that bug report is just like the one I've been getting. I hope someone can fix it, I can't use codeblocks without custom shortcuts. If there is anything I can help with I would be glad to, but I've been unable to find the source of this bug as I have zero experience with anything GUI related.
The link to the bug report is http://sourceforge.net/p/codeblocks/tickets/173/


Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12821
    • Travis build status
Re: Keyboard shortcuts not working on Debian
« Reply #1 on: August 14, 2015, 09:08:38 am »
Most probably this is caused by wx30.
We'll have to investigate...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline dp_alvarez

  • Single posting newcomer
  • *
  • Posts: 6
Re: Keyboard shortcuts not working on Debian
« Reply #2 on: August 14, 2015, 10:55:09 pm »
Most likely, just tested it on a clean Mint 17.2 installation and it worked perfectly. Will try to compile it against wx 2.8 on my Debian installation later, I found a post here that will be very helpful: http://forums.codeblocks.org/index.php?topic=20276.0

Still, it would be nice to have that bug fixed so I can use the version in the Debian repos without problems.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2262
Re: Keyboard shortcuts not working on Debian
« Reply #3 on: August 15, 2015, 08:46:30 pm »
I've gotten some personal messages concerning this "bug" (evidently on wx30).

It's going to take some time for this to be resolved.

I do not have experience with wx30 or linuxes other than ubuntu, but will investigate as time permits.
 

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2262
Re: Keyboard shortcuts not working on Debian
« Reply #4 on: August 23, 2015, 10:36:06 pm »
Fixed in SVN 10415 and tested with wx3.0 (binary in Linux Mint). I did not test with 64 bit.

Offline dp_alvarez

  • Single posting newcomer
  • *
  • Posts: 6
Re: Keyboard shortcuts not working on Debian
« Reply #5 on: August 25, 2015, 07:45:44 am »
Thank you very much for the fix Pecan! Unfortunately I can't get CB the latest version from SVN to run. It compiles fine, but when I try to run it I get the following error: "codeblocks: symbol lookup error: codeblocks: undefined symbol: cbEVT_APP_CMDLINE".
I'm on Debian Jessie x64, anyone has a clue on what could be causing this?

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12821
    • Travis build status
Re: Keyboard shortcuts not working on Debian
« Reply #6 on: August 26, 2015, 12:08:28 pm »
Probably you're mixing different installation.
My guess is that you have libcodeblocks.so in a standard location and you've installed another copy in another location.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline dp_alvarez

  • Single posting newcomer
  • *
  • Posts: 6
Re: Keyboard shortcuts not working on Debian
« Reply #7 on: August 29, 2015, 08:06:49 am »
That is right, didn't notice package codeblocks was separate from libcodeblocks.
The main issue is fixed, but there still is a slight inconvenience: When the focus is on the editor keybindings to open logs or the manager don't open them. They are closed if already opened, and if I press a hotkey to change the focus it works, but that is kind of inconvenient.

Thanks again for the fix Pecan! Hope this can be fixed too when possible  ;D

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2262
Re: Keyboard shortcuts not working on Debian
« Reply #8 on: August 31, 2015, 07:39:01 pm »
That is right, didn't notice package codeblocks was separate from libcodeblocks.
The main issue is fixed, but there still is a slight inconvenience: When the focus is on the editor keybindings to open logs or the manager don't open them. They are closed if already opened, and if I press a hotkey to change the focus it works, but that is kind of inconvenient.

Thanks again for the fix Pecan! Hope this can be fixed too when possible  ;D

Please describe exact steps to cause the problem.

Offline dp_alvarez

  • Single posting newcomer
  • *
  • Posts: 6
Re: Keyboard shortcuts not working on Debian
« Reply #9 on: September 01, 2015, 09:46:20 am »
This happened with the latest version from the SVN in a (mostly) clean Debian Jessie.
-Start with a clean codeblocks profile
-Create a new project
-Close the logs windows
-While editing any file in the project, press F2 (the default hotkey to the logs window)
-If the focus is on the editor (it should be, as you were editing a file) it does nothing but it should have opened the logs

If you repeat the same steps but leave the logs window open before editing a file F2 does work and closes the logs window as it should, but if you try to press it again to open the window it does not work anymore.
The same happens with the Shift-F2 hotkey, even if I bind it to another hotkey in keybinder.

Offline dp_alvarez

  • Single posting newcomer
  • *
  • Posts: 6
Re: Keyboard shortcuts not working on Debian
« Reply #10 on: September 01, 2015, 09:53:59 am »
Oh, and using this thread to ask a totally unrelated question that is not worth its own thread, about the swap header<->source functionality:
I'm editing a .c which is in the same directory as a .d and a .h files with the same name. Only the .c and .h files are in the codeblocks project.
When I press the hotkey while in the .c file it opens the .h, but when in the .h it opens the .d instead of the .c. I'm guessing that is because another language uses .d as it's file extension and codeblocks is finding that file first. Is there any way to prevent this, and force it to open the .c instead?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2262
Re: Keyboard shortcuts not working on Debian
« Reply #11 on: September 19, 2015, 11:39:38 pm »
This does not appear to be a KeyBinder issue.

The code controlling F2 for the logs is at void MainFrame::OnToggleBar(wxCommandEvent& event), and F2 invokes that code for both toggle on and toggle off when traced.

However, the DoUpdateLayout(); call in that function does nothing when called to toggle on the logs and an editor is active (in linux).

Every statement is executed correctly in that function. However, toggling the logs ON for linux does not work.

Since I have no experience in the layout control code. I'll leave it alone.




Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Keyboard shortcuts not working on Debian
« Reply #12 on: September 20, 2015, 12:28:29 am »
Every statement is executed correctly in that function. However, toggling the logs ON for linux does not work.

Which window-manager, which desktop-environment ?
It works fine here on Fedora 22 with gnome-shell 3.16, with C::B from my repo and C::B with wx3.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2262
Re: Keyboard shortcuts not working on Debian
« Reply #13 on: September 20, 2015, 07:58:57 am »
I was using mint with whatever the installed defaults are. wx3.0 32-bit

Offline Silyus

  • Single posting newcomer
  • *
  • Posts: 3
Re: Keyboard shortcuts not working on Debian
« Reply #14 on: January 18, 2016, 02:40:16 pm »
I'm sorry for the necropost, but I'm experiencing the exact same issue as the OP.

I'm on a Debian 64 Jessie, and I've installed codeblocks from the backport repository
Code: [Select]
deb http://http.debian.net/debian jessie-backports mainI can't use the version of CB from svn since I require a stable programming IDE  for my projects.

I'm using xfce4 and, as some people already points out, the problem might be related to wx3.
I've already reply on the sourceforge post confirming the behaviour.

P.S. a completely unrelated question: why CB is not present in the main debian repository? (yet it's present in the backport ones)
Moreover, is it possible to roll out an hotfix for that? (i know nothing about the packet policies)
Without using my custom shortcut I'm not sure if I can keep CB as my main IDE, and switching to another one is always troublesome :(