Old 19th September 2010, 20:59   #1
bengle
Junior Member
 
Join Date: Mar 2007
Posts: 8
Local shortcut keys

My wish is for the ability to define your own shortcut keys for the play buttons (Play, Pause, Stop, Next, Previous). Right now the shortcut keys are predefined to be Z, X, C, C, and V. I need to hit Play and Pause repeatedly when listening to language learning recordings. It is all too easy to hit the wrong key and cause the recording to stop, thus losing your position.

I am talking here about local shortcut keys that would be active when WinAmp had the focus, and not global hotkeys, which would be active when you are running another application. I would like to define some single and easy-to-hit key, like the Space bar, or Enter key. Obviously, I would want such a key to be a global hotkey.
bengle is offline   Reply With Quote
Old 19th September 2010, 21:30   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
there's a simple way to do it if you know how to...

take winamp.lng from the example en-us language pack, use a resource editor to change the accelerator table, save the edited winamp.lng into a zip file, rename the zip to .wlz and then double-click to install the language pack into Winamp with your altered keyboard shortcuts.

-daz
DrO is offline   Reply With Quote
Old 21st September 2010, 01:47   #3
Abscissa
Junior Member
 
Join Date: Sep 2010
Posts: 18
Where can I find the en-us language pack? It's not in my installation directory or the winamp plug-in search page. (I'll try your en-gb pack instead, but I'd prefer en-us.)
Abscissa is offline   Reply With Quote
Old 21st September 2010, 02:50   #4
Abscissa
Junior Member
 
Join Date: Sep 2010
Posts: 18
I've followed your instructions, but it's not making any difference. I tried using Resource Hacker ( http://www.angusj.com/resourcehacker/ ). The versions of Visual Studio I have installed don't seem to be able to handle that resource file at all.
Abscissa is offline   Reply With Quote
Old 21st September 2010, 02:52   #5
bengle
Junior Member
 
Join Date: Mar 2007
Posts: 8
Editing accelerator table

I was unable to find the en-us language pack either. The Lang subdirectory of the installation contains everything but en-us. However, I edited the "winamp.exe" executable file with Microsoft Visual Studio and changed the accelerator tables thay way.

However, this is far from an ideal method of dealing with it. First of all, I doubt that most users have or know how to use resource editors. Second, You will have to repeat this process every time a new product update comes out.

What would be great, would be if you could define the some local shortcut keys via the preferences dialog box and have those preferences remembered when you update the product.
bengle is offline   Reply With Quote
Old 21st September 2010, 03:02   #6
Abscissa
Junior Member
 
Join Date: Sep 2010
Posts: 18
Agreed. The lack of ability to do this seems downright absurd, especially considering how customization-friendly winamp already is (well, with only one other very glaring exception), and the fact that it already went to such lengths to include customizable keyboard shortcuts on a system-wide level.
Abscissa is offline   Reply With Quote
Old 21st September 2010, 04:50   #7
Abscissa
Junior Member
 
Join Date: Sep 2010
Posts: 18
I edited the exe itself in Visual Studio like bengle did and it didn't seem to work...until I clicked on one of the non-library panels. *Then* it worked. Then I focused back on the library. And it *stopped* working again.

Then I went back to the un-modified exe. Turns out it has the same problem. If the library has focus, then a number of the keyboard shortcuts stop working ("Play URL" for instance). Rather defeats the point of a keyboard shortcut.

There's a lot about iTunes I've always hated, but one thing I absolutely loved about it was that I could (reliably) just slap space whenever to play/pause. That was one thing about it that always just worked (though there was plenty about iTunes that certainly didn't "just work" - which is a big part of why I've been looking for alternatives).

I realize that typing into the library is supposed to select the closest match which might seem like an argument against letting keyboard combos work when the library has focus, but I can't think of a song or artist name that starts with a space (Yes, the metadata might contain leading whitespace, but it's not *really* part of the name.) And it still doesn't explain "Play URL" not working, since that one's a Ctrl-KEY combo. Fortunately there's an easy solution: A keyboard shortcut should be recognized if and only the user isn't in the middle of typing and/or it's nonsensical as the first character of a name to be searched for (ie, if it's a Ctrl- combination, or whitespace, or possibly an Alt- combination).
Abscissa is offline   Reply With Quote
Old 21st September 2010, 10:32   #8
DrO
 
Join Date: Sep 2003
Posts: 27,873
http://xlat.meggamusic.co.uk/winamp/docs/xlat/xlat.html has the en-us example file and this is why i said to use a language pack file as you've hit the exact reason why editing winamp.exe is not suggested and should never be done.

customising the local shortcuts will just cause more issues than it's worth as how do you then tech support the issue? too much customisation is a bad thing with over complication of code, preferences and a few other areas as i'm sure you'd then want it to update all menu items to the new values, etc.

if you don't like how things are done then there's nothing stopping you coding up something which will completely override all of Winamp's shortcuts, map it to the relevant WM_COMMAND handlers and do it that way.

Quote:
Obviously, I would want such a key to be a global hotkey.
just seen that at the end of the first post and that contradicts having the shortcuts being only changed on a local level.

either way, changing the accelerator table (sometimes having to change entries in all 3 tables) is the only way that you can alter local shortcut keys and is how it has been and most likely will be.

-daz
DrO is offline   Reply With Quote
Old 21st September 2010, 11:04   #9
Abscissa
Junior Member
 
Join Date: Sep 2010
Posts: 18
Quote:
Originally Posted by DrO View Post
Thanks

Quote:
Originally Posted by DrO View Post
and this is why i said to use a language pack file as you've hit the exact reason why editing winamp.exe is not suggested and should never be done.
Not sure what you mean here. I pointed out that the problem exists in the *NON*modified winamp as well.

Of course, I absolutely agree that needing to edit the exec is absolutely no substitute for having a real options setting.

Quote:
Originally Posted by DrO View Post
if you don't like how things are done then there's nothing stopping you coding up something which will completely override all of Winamp's shortcuts, map it to the relevant WM_COMMAND handlers and do it that way.
Is the winamp source available? Or do you mean that can be done through winamp's plugin system? (I wouldn't know, I haven't looked at winamp's plugin api.)

Quote:
Originally Posted by DrO View Post
"Obviously, I would want such a key to be a global hotkey."

just seen that at the end of the first post and that contradicts having the shortcuts being only changed on a local level.
I don't mean to put words in anyone's mouths, but I'm fairly certain that was just a typo.

Quote:
Originally Posted by DrO View Post
...is how it has been and most likely will be.
That's not a particularly good reason for keeping something a certain way.
Abscissa is offline   Reply With Quote
Old 21st September 2010, 15:42   #10
bengle
Junior Member
 
Join Date: Mar 2007
Posts: 8
Thank you for the link. That certainly isn't someplace that I woud have known to look for it. I am now going to restore winamp.exe and try customizing the winamp.lng file.

Question... Does the .wlz file need to contain everything or only the winamp.lng that I have changed?

By the way...

Quote:
Originally Posted by DrO
"Obviously, I would want such a key to be a global hotkey."

just seen that at the end of the first post and that contradicts having the shortcuts being only changed on a local level.
This was, indeed a typo, it should have read "Obviously, I would NOT want such a key to be a global hotkey."

Another question... Does the winamp.lng file need to be recustomized every time they come out with a product update (i.e. do the resources change with maintenance releases)? If so, does the sample provided on the http://xlat.meggamusic.co.uk/winamp/docs/xlat/xlat.html web site updated each time?

I agree with Abcissa completely. This is better than nothing, but it is not really a substitute for customization through the user interface. This process is quite cumbersome. Additionally, customization should be remembered when you upgrade the product.
bengle is offline   Reply With Quote
Old 21st September 2010, 18:03   #11
bengle
Junior Member
 
Join Date: Mar 2007
Posts: 8
Another way that this could be implemented

Here is another way that local shortcut keys could be implemented by the WinAmp developers... Granted, this is not as nice as a user interface customization, but it would be far easier to implement and would avoid some of the problems discussed earlier with product upgrades.

My suggestiuon would be to separate the accelerator tables into a separate, resource-only DLL, outside the language pack. The accelerator tables could be loaded separately, using a different instance handle than the other resources.

The accelerator tables are not really language specific. Also, the accelerator tables are unlikely to change frequently the way that string resources for messages, etc. or dialog templates might change.

An accelerator-only resource DLL would be language independent and could be used without alteration across product upgrades.
bengle is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Wishlist

Tags
accelerator, hotkey, key, keyboard, shortcut

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump