Footswitch transcription tool working within LibreOffice Writer
Version 1.3.0
Languages available, English,Español & Deutsch, although the translations
are probably very poor. I blame internet translation tools ;)
This python script allows the transcriber to work wholly within LibreOffice
Writer with control of the Play/pause, Jump back and Jump forward
available via Hot Key, button click or a foot pedal.
It was written specifically to run under Linux using:
a VEC Infinity USB foot pedal but will work with foot pedals from other
manufacturers, see the notes below
and LibreOffice Writer as the word processor.
There is no reason for it not to work under a Windows OS, in principle,
with the exception of access to a foot pedal, where I believe that interfacing
with a HID device (foot pedal) can be problematic.
That said, I would think that configuring “footswitch” to not use a foot pedal
and assigning the Hot Key actions to the physical foot pedal using the
“AutoHotKey” software, freely available for Windows users, would achieve the
same result.
If you attempt to access a foot pedal using footswitch in MS Windows or Mac OS,
I would love to know if and how you succeed. In which case I can update this
document. I for my part do not own either OS.
Written on a Linux Mint 19 64bit machine using python 3.5.2
and LibreOffice 6.0
Dependencies are as follows:
LibreOffice
python3-uno
default-jre (Java Runtime Environment)
libreoffice-script-provider-python
libreoffice-avmedia-backend-gstreamer
python-evdev (Linux only and only if you are using a foot pedal)
pkexec (Linux only and only if you are using a foot pedal)
To install footswitch, ensure that the dependencies are loaded on your machine
and simply double click on the footswitch.oxt file.
Libreoffice will install the extension for you.
Exit Libreoffice and then load Libreoffice again.
This time Libreoffice Writer will have the footswitch extension ready to run.
Footswitch (LibreOffice version) is a media player in its own right.
Built using the python bindings for LibreOffice it listens to the foot pedal
and calls the functions which you have assigned to them.
Other flavours of footswitch are available, which are only for Linux
and run separately from but in conjunction with LibreOffice Writer.
There are versions based on both the Vlc and Gstreamer media players.
For details visit https://sourceforge.net/u/rolfofsaxony
Features:
- Uses Gstreamer bindings in LibreOffice so should play whatever audio media
Gstreamer can play
- Configuration of 3 pedals for Infinity USB foot pedal (or USB pedals from
other manufacturers)
Jump Forward, Jump Back, Play/Pause,Timestamp, Unclear timestamp and Disable (pedal)
- Controls are Pause, Play, Jump back, Jump Forward, Stop, TimeStamp,
Unclear TimeStamp, Adjust Volume
- Configurable Jump lengths and jump back after pause
- Very small (always on top) window footprint allowing full-screen
for text editor
- Running time and current position displayed
- Alterable Hot-Keys for all of the functions
- Plays common video files
- Pre-loaded LibreOffice Writer Hot-Keys
Alt+1 Load footswitch
Alt+2 Toggle Play/Pause
Alt+3 Stop/Exit
Alt+5 Jump Back
Alt+6 Jump Forwards
Alt+8 Volume Up
Alt+9 Volume Down
Alt+0 Help
Alt+T Insert Time Stamp
Alt+U Insert Unclear Time Stamp
Known issues and limitations
On the Raspberry Pi using the raspbian operating system, there is, as yet,
no python3-evdev package available. This means that you cannot use footswitch
with a foot pedal on that system.
On a Raspberry Pi running the latest Ubuntu-Mate operating system,
you may find that all input devices in /dev/input appear to belong to the
input group.
The result can be that all devices can be treated as valid entries for your
foot pedal. It depends on how you set up your login.
The safest way to find the correct HID_FILE_ID entry for footswitch is to use
the “list_hid_devices” macro provided.
I do not own, or have access to, a machine that runs either a Windows OS or
Mac OS. I have attempted to make everything in footswitch generic,
so I hope that it will work on those operating systems.
The caveat to that statement, is that controlling devices on those operating
systems is quite different to Linux, so getting a foot pedal to work,
will be down to your own abilities to solve the problem.
I have made suggestions which I think should work.
Not withstanding, you should still be able to operate using the hot-keys
and the control buttons.
Video: has proven troublesome but I now allow for the following file types
"mp4","avi","mkv","ogv","wmv","mpg","flv" and "mpeg".
Setting a default size for the video window, which opens separately,
has proven not to work, so far.
Thus you will have to manually re-size the video window.
While playing video, if you shut the video window, the player will stop.
If you don't want to see the video, simply minimise it.
Other languages and improvements in translation:
The core messages and help texts are held in a file in the footswitch.oxt
directory under $HOME/.config/libreoffice/4/user/uno_packages/cache/uno_packages
Each file is named messages_xx.txt where xx is the language code.
Delivered with the package are messages_en.txt and messages_es.txt, you can
provide your own translation by copying the messages_en.txt to your own
language i.e messages_fr.txt (french) and keying in your own text.
The text of the message should contain NO commas (,) and if you require a
newline to be included in the text input a | symbol where you want the newline
If you would like to email the translation file to me please include the
translation for the description-en.txt file in the sub-directory pkg-desc
and translations of the 4 footswitch menu entries in LibreOffice as well.
I will be happy to include them in future releases of the package.
Change Logs
Footswitch (for LibreOffice) (1.3.0)
* Libreoffice has moved onto Gtk3 which uses larger icons which means that
* the GoTo Time Spin Control tripled in size. The Up/Down control changed
* to large +/- buttons.
* The GoTo Time control has had the buttons removed but it still functions with
* the mouse wheel and the up/down keys as before
* footswitch has been modified to cater for the larger icons and widgets
* footswitch now obeys "Close Window" if clicking on the Close Window widget
* minor adjustments to the screen layout plus Playing Status info
*
Footswitch (for LibreOffice) (1.2.0)
* The gksu package, which provides GTK+ front-ends for su (gksu) and sudo (gksudo)
* was removed from the Ubuntu 18.04 repositories and thus Mint 19 as well.
* Footswitch for libreoffice makes use of gksudo for the installation.
* This version uses pkexec instead
*
Footswitch (for LibreOffice) (1.1.0)
* The known_hid_footpedals.txt file has been included in the delivery.
* This file is used to dynamically find and assign the foot pedals
* HID identity
*
* A new option on the Footswitch drop down menu has been added
* “Edit Known Footpedals”
* This allows you to edit the file and add your own footpedals
* Hid devices codes if they are not already included in the file
*
* known_hid_footpedals.txt file
#This is a list of known foot pedals for the udev system
#first part is the vendor:product id and then a comma separator
# and then the name of the device
# To add your own device, just add it to the end of the text
# on its own line.
# Note: to get the vendor:product id of your device
# type lsusb on the command line
# Lines that start with the hash (#) character are comments
#
05f3:00ff,Vec foot pedal
07b4:0202,Olympus RS26 foot pedal
07b4:0218,Olympus RS28 foot pedal
0c45:7403,Microdia foot pedal
0d50:0040,F4 foot pedal
12c4:0008,Telep foot pedal
0911:091a,Philips foot pedal
*
*
Footswitch (for LibreOffice) (1.0.0)
* Initial release
*
End: