Linx Trix

January 15, 2008

Views

Filed under: Uncategorized — admin @ 6:55 pm

It’s funny that things like this:

Have a low View count. Even if someone things these guys are wackos, I guess they are better then these guys:

But the thing is, the first has 91 views at the time of this writing, and was added Jan 7, the other has 53,xxx and was added Jan 3, and I hardly believe the few days have such an impact… rather the topic…

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

January 13, 2008

RegisterHotkeys(accelerators) with wxWidgets on linux

Filed under: Uncategorized — admin @ 10:12 am

wxWidgets has no way of grabbing hotkeys in Linux. I mean off focus hotkeys or key presses, only when your app has focus you can grab all the keys. So let’s say you are building a tray app, and want to grab a hotkey like Ctrl+Alt+B and do some action like popping up your input window or whatever, there is no way of doing it unless you want to play with XGrabKeyboard or XGrabKey, that’s all fine on some WM’s, but mostly you will have lots of grief doing it (I tried but failed to make it working on all possible combinations(Kde, Gnome, Beryl,…).

I have a solution which is not so good in terms of security, but maybe it’s acceptable to some people, so here it goes:

Just grab your inputs from /dev/input/event* and process them for yourself. Yes you will have to have root permissions, or suidroot, or whatever you prefer to access that, but it is a way around in which you will not have to worry about other subsystems since you are grabbing your keyboard directly from the source. So for some people this might be a solution.

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

Powered by WordPress