Author Topic: Keyboard Macros plugin  (Read 7743 times)

Offline LonelySTar

  • Multiple posting newcomer
  • *
  • Posts: 30
Keyboard Macros plugin
« on: October 06, 2007, 12:13:58 am »
Hello,

I wrote a plugin for C::B to record and playback Keyboard Macros. I tried the KeyMacs plugin but it did not fullfill my needs.
But my plugin only works under Linux/X11 with the record extension enabled.

What the plugin can do, and I was missing in KeyMacs:
- The AltGr key is recorded (I believe US Keyboard do not have this key, but my german keyboard has).
- Using dialogs like the find dialog can be done in a macro.
- It does not wait for you to release all keys before playback.
- A key macro can be bound to a char event. I for Example like to have the courser movements bound to the emacs shortcuts. If I press Ctrl+f, the courser moves to the right. If you would bind this macro to a normal keybinding, the movement is not repeated when holding down Ctrl+f.

What the plugin can not do:
- Does only work under Linux/X11
- You can not edit a recorded macro

I do not know if people are interested in this plugin and did not create a wiki entry for it.
I use the record extension for recording key events and XSendEvent for playback.
If people are interested, I would look into porting this to windows.
Anyone knows what a good way of recording and playing key events under windows?

How to enabled the record extensions:
Add this to the "Module" section of  your X config file:
Code: [Select]
     Load         "record"

Link to download the plugin: http://www.savefile.com/files/1103151

Greetings,
Nathan

Offline kfmfe04

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Keyboard Macros plugin
« Reply #1 on: June 27, 2009, 09:57:04 am »
The link appears to be broken...   :(

I'm actually looking for any solutions which will allow me to edit using the keyboard-only (no mouse).  Specifically, rather than arrow keys, I need to map directions to other keys like emacs-bindings, so I don't need to take my fingers off home row. 

I tried the Keyboard Shortcuts plug-in, but that only seems to map to pre-existing menu items...

Any suggestions would be greatly appreciated.

- Ken
« Last Edit: June 27, 2009, 10:04:55 am by kfmfe04 »

Offline LonelySTar

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: Keyboard Macros plugin
« Reply #2 on: June 27, 2009, 11:10:47 am »
The link appears to be broken...   :(

I'm actually looking for any solutions which will allow me to edit using the keyboard-only (no mouse).  Specifically, rather than arrow keys, I need to map directions to other keys like emacs-bindings, so I don't need to take my fingers off home row. 

I tried the Keyboard Shortcuts plug-in, but that only seems to map to pre-existing menu items...

Any suggestions would be greatly appreciated.

- Ken


Well, that  was a long time ago.
I had the same needs as you (I wanted emacs keybindings). The KeyboardMacros where a good Idea, but it did not really work as I remember. I gave up on codeblocks for that reason.

Here is the old project: http://lonely-star.org/KeyboardMacros.tar.gz
I don't know, if it is any use, but you can try.

Regards,
Nathan


Offline kfmfe04

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Keyboard Macros plugin
« Reply #3 on: June 27, 2009, 12:14:45 pm »
Thanks, I will take a look.

Too bad they didn't just add the following to MenuBar>Edit>Special commands>Movement:

Character left
Character right
Line up
Line down

That's all I need - it's probably a 5 minute change in the code for someone who knows that chunk...

BTW, what environment/IDE do you use instead?  Emacs?  XEmacs?  Or something else?

- K

Offline LonelySTar

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: Keyboard Macros plugin
« Reply #4 on: June 27, 2009, 12:18:57 pm »
BTW, what environment/IDE do you use instead?  Emacs?  XEmacs?  Or something else?

- K


emacs, together with cedet. It's doing OK. But sometimes I miss the features of a real IDE like C::B ...