geekhack

geekhack Community => Other Geeky Stuff => Topic started by: ASETNIOP on Fri, 08 May 2015, 15:26:26

Title: Best Language for Key Remap Program
Post by: ASETNIOP on Fri, 08 May 2015, 15:26:26
Hi everyone,
I'm the designer of ASETNIOP; things have been dormant for me for a long time but I've just recently gone diving back into the code and want to start working on a desktop version.  I'm hoping to write something similar to the functionality of AutoHotKey; i.e. something that will allow me take over keystrokes coming from the keyboard and deal with them my own way.  Does anyone have any advice over what language would be best to use to do this?  I'm not doing anything particularly complicated on the back end; it's just a lot of for loops and string manipulation.  Mainly I'm interested in something where it will be fairly easy to interpose the program between the keyboard input and what eventually gets sent to the computer. 

Any suggestions?
Title: Re: Best Language for Key Remap Program
Post by: user 18 on Fri, 08 May 2015, 16:06:18
Probably can't go too far wrong writing something in C.
Title: Re: Best Language for Key Remap Program
Post by: Sygaldry on Fri, 08 May 2015, 16:20:40
Seconding the C recommendation.
Title: Re: Best Language for Key Remap Program
Post by: ttzhou on Sat, 09 May 2015, 11:19:25
thirded for C.

there's a reason linux kernel is written in it.
Title: Re: Best Language for Key Remap Program
Post by: ASETNIOP on Mon, 11 May 2015, 11:25:16
Cool, I'll take a good hard look at that first.  Thanks for the advice, folks!
Title: Re: Best Language for Key Remap Program
Post by: metalliqaz on Mon, 11 May 2015, 11:43:19
thirded for C.

there's a reason linux kernel is written in it.

Yes, because Linux is a kernel.  If I understand OP correctly, he would be creating two programs: a driver and a GUI.  For the former, C is an obvious choice.  For the later, C is miserable.  It's 2015!  I'd probably use C# .NET for Windows, and for *nix I'd use Python.
Title: Re: Best Language for Key Remap Program
Post by: ttzhou on Mon, 11 May 2015, 11:46:07
thirded for C.

there's a reason linux kernel is written in it.

Yes, because Linux is a kernel.  If I understand OP correctly, he would be creating two programs: a driver and a GUI.  For the former, C is an obvious choice.  For the later, C is miserable.  It's 2015!  I'd probably use C# .NET for Windows, and for *nix I'd use Python.

I consider the GUI as a separate component. I interpreted his question as best language to write the core functionality (the driver, as you mention).

GUI is overrated  :p But yes, an OOPL would be a lot better. And Python's main implementation is still in C :P
Title: Re: Best Language for Key Remap Program
Post by: ASETNIOP on Mon, 11 May 2015, 13:15:26
thirded for C.

there's a reason linux kernel is written in it.

Yes, because Linux is a kernel.  If I understand OP correctly, he would be creating two programs: a driver and a GUI.  For the former, C is an obvious choice.  For the later, C is miserable.  It's 2015!  I'd probably use C# .NET for Windows, and for *nix I'd use Python.

I consider the GUI as a separate component. I interpreted his question as best language to write the core functionality (the driver, as you mention).

GUI is overrated  :p But yes, an OOPL would be a lot better. And Python's main implementation is still in C :P

This is correct; I'll be needing a driver and a GUI.  It's meant to be a touch-typing system, however, so the GUI is kind of a secondary consideration (aimed more at beginners) so I'll be aiming a lot more of my focus on the driver part.