Remap keyboard input in OpenOffice to perform things like "Quit"

1

I'm using a Logitech R400 2.4 GHz Wireless Presenter, seen by the OS as a standard USB keyboard that has 4 buttons (page up, page down, f5, and 'v') and I need to remap specific keys to certain functions, like quitting the program.

I'm creating an exhibit for a museum in which I need to launch a PowerPoint presentation in OpenOffice from the app and control the presentation with a presenter remote.

I need to be able to exit OpenOffice from the remote. Does anyone know how I could do this?

I'm using Ubuntu Linux and can run any window manager I need to (currently Awesome WM).

The operator should be able to cycle back and forth through the presentation and be able to exit any time with one of the buttons.

notlesh

Posted 2013-01-03T23:11:19.870

Reputation: 11

Can you make a button called quit out of your favorite rectangle? – Mikhail – 2013-01-03T23:18:01.200

You mean the buttons on the remote? No, the remote appears as a standard USB keyboard to the OS. – notlesh – 2013-01-03T23:26:33.047

I mean make a button in powerpoint – Mikhail – 2013-01-03T23:27:26.447

There's no pointer / mouse device, and the operator should be able to exit at any time. – notlesh – 2013-01-03T23:32:00.477

Answers

0

I've found a solution that uses an approach outlined here.

The only thing I really modified in his script was the xkb_symbols table. Mine reads:

xkb_symbols "remote" {
    key <FK05>   { [ Escape         ] };
};

which remaps the f5 key to escape. During an OpenOffice slide show, the escape key exits the show.

To run OpenOffice such that it immediately begins the slideshow, I invoke it as such:

soffice --invisible --norestore -show <slideshow file>

I invoke it this way from my native C++ app with the system() function. Once it is up and running, pressing the remapped button on the remote exits the presentation and returns focus to my app.

notlesh

Posted 2013-01-03T23:11:19.870

Reputation: 11

0

I have found a solution for you: you can use AutoHotKey to remap the device button, here is a post of someone who did it and explains how to do it.
Yet I found another solution that might help you as well and presents remapping keys from ubuntu and logitech R400.

Good Luck

avi.tavdi

Posted 2013-01-03T23:11:19.870

Reputation: 132

Thanks, but AutoHotKey appears to be a Windows only app. I'm running Ubuntu Linux. – notlesh – 2013-01-07T21:48:15.027

0

Read this article on how to rebind keys in Ubuntu:

https://askubuntu.com/questions/24916/how-do-i-remap-certain-keys

Llamanerds

Posted 2013-01-03T23:11:19.870

Reputation: 372

At least, I am assuming that this functionality is included in the Linux releases of OpenOffice, and not just the Windows version. If not you might try LibreOffice, which is basically the same product but with different licensing (IIRC). – Llamanerds – 2013-01-08T19:31:10.950

Sorry, I should have included that in my question. That doesn't work inside presentation mode, unfortunately. – notlesh – 2013-01-08T19:48:34.170

In that case, you might look at this post: http://askubuntu.com/questions/24916/how-do-i-remap-certain-keys The second answer to the question looks like it addresses your problem.

– Llamanerds – 2013-01-08T20:56:18.763

Thanks. I think xmodmap would have worked as well, and might actually be simpler. So I'll give you my bounty points :) – notlesh – 2013-01-08T22:00:46.740

I edited the answer to reflect the actual useful information. – Llamanerds – 2013-01-11T00:38:27.487