Thread: Smart Q7 Tablet
View Single Post
Old 07-23-2009, 01:16 PM   #517
Suwat
Enthusiast
Suwat began at the beginning.
 
Posts: 25
Karma: 14
Join Date: Jul 2009
Location: Nakhon Pathom, Thailand
Device: Nokia N800, SmartQ7
Quote:
Originally Posted by rogue_ronin View Post
Change the openbox keybindings.

I just started to look at this -- it's not enough for what I want to do, but it will solve your problem.

Right now, Smart has configured the power button to launch coman, which is the program you see when you touch the power button.

The config file is /home/user/.config/openbox/lxde-rc.xml. There is a section called <keyboard> that has what you need to change.

Look for :
Code:
<keybind key="XF86PowerOff">
  <action name="Execute">
    <startupnotify>
      <enabled>true</enabled>
        <name>coman</name>
    </startupnotify>
    <command>coman</command>
  </action>
</keybind>
Change it to:
Code:
<keybind key="XF86PowerOff">
  <action name="Execute">
    <startupnotify>
      <enabled>true</enabled>
        <name>Suspend</name>
    </startupnotify>
    <command>sudo pm-suspend</command>
  </action>
</keybind>
Now when you press the power button, the device will suspend.

If you find it is happening by accident a lot -- you keep unintentionally pressing the button -- add the following line:

Code:
<prompt>Suspend Device?</prompt>
below the <command> line. It will ask you if you want to suspend.

You can still power off from the normal menu, and you can still configure the touchscreen with Alt-Power.

I'm not an openbox guy, but that should work.

Now, does anyone know how to make keymaps? I want to globally configure Alt-Esc as F11. Help!

m a r
Thanks for your post, I solved my touchscreen problem. My smartq7 touchscreen lock-up a lot and I had to do a hard reset. Now, I can just suspend, turn it back on and continue where I left off. I use the power key to suspend and A-power to invoke coman.

What do you want to config Alt-Esc as F11 for? If you, like me, just want to toggle evince to fullscreen, you can:

<keybind key="A-Escape">
<action name="ToggleFullscreen"/>
</keybind>

But if you really want key-mapping, it's probably impossible for openbox. After your suggestion above, I did some research on openbox website and couldn't find anyway to map keys in openbox. You may need to write a shell script to send the F11 key for you. This is way over my head though.
Thanks again, Suwat.
Suwat is offline   Reply With Quote