Feature request: define recording hotkey

Bug #1472912 reported by Or Schiro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Audio Recorder
New
Wishlist
Unassigned

Bug Description

Dear all,

You're doing an amazing work with Audio Recorder, thanks a lot!

May I suggest one feature that I really like from the Simple Screencast Recorder?

Please see the attached screenshot how they implemented a feature to use hotkeys for recordings.

May something similar be possible for Audio Recorder?

Thankfully,

Robert

Revision history for this message
Or Schiro (orschiro) wrote :
Revision history for this message
moma (osmoma) wrote :

Just a comment.

Libkeybinder library could be used to implement a global hotkey for audio-recorder.
Ref: https://github.com/kupferlauncher/keybinder

There is a a simple example that uses keybinder.
Compile the code (test1.c) with:

$ gcc test1.c $(pkg-config --libs --cflags gtk+-3.0) $(pkg-config --libs --cflags keybinder-3.0) -o test1

Run it:
$ ./test1

/* Code of test1.c
 * Created in 2010 by Ulrik Sverdrup <email address hidden>
 * This work is placed in the public domain.
   https://github.com/kupferlauncher/keybinder/blob/master/examples/main.c
*/

#include <stdio.h>

#include <gtk/gtk.h>
#include <keybinder.h>

#define EXAMPLE_KEY "<Ctrl>A"

void handler (const char *keystring, void *user_data) {
  printf("Handle %s (%p)!\n", keystring, user_data);
  keybinder_unbind(keystring, handler);
  gtk_main_quit();
}

int main (int argc, char *argv[]) {
  gtk_init(&argc, &argv);

  keybinder_init();
  keybinder_bind(EXAMPLE_KEY, handler, NULL);
  printf("Press " EXAMPLE_KEY " to activate keybinding and quit\n");

  gtk_main();
  return 0;
}

Revision history for this message
Or Schiro (orschiro) wrote :

Thanks, moma!

Maybe it helps someone to implement it.

I cannot make that happen myself. :-)

Revision history for this message
moma (osmoma) wrote :

Ok, all good.

I forgot to mention that one must also install the libkeybinder-3.0-dev package.

$ sudo apt install libkeybinder-3.0-dev

Check the library version, libs and cflags
$ pkg-config --modversion keybinder-3.0
$ pkg-config --libs keybinder-3.0
$ pkg-config --cflags keybinder-3.0

moma (osmoma)
Changed in audio-recorder:
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.