View unanswered posts | View active topics It is currently Sun Mar 24, 2019 8:52 am



Reply to topic  [ 14 posts ] 
Map "ESC" to Exit? 
Author Message
New Member

Joined: Sat Sep 23, 2006 1:42 pm
Posts: 5
Reply with quote
Post Map "ESC" to Exit?
Hey All, New Forum User here!

I've been using ZSNES for so many years that I lost count, so when I decided to build an arcade cabinet with multiple arcade and console emulators, naturally ZSNES was my first and only choice for representing SNES.

Unfortunately I've come to an issue I can't seem to find a workaround for, and that is simply mapping the escape key to exiting the emulator (such as with mame).

Obviously I have very little key representation on my button layout, and I need consistency between my emulator behaviors, so this is Very important to me! There doesn't seem to be a way to map it through the UI or cfg file.... is it contained within the dat file? If so, how would I edit it?

I've used and loved ZSNES for years... it would suck if I can't use it for my cab..

Any thoughts?


Sat Sep 23, 2006 2:17 pm
Profile
ZSNES Developer
ZSNES Developer

Joined: Tue Dec 28, 2004 6:47 am
Posts: 6747
Reply with quote
Post 
Grab one of the WIPs from http://zsnes.ipherswipsite.com (I don't know when it was added, but it was surely added before 2006).

Go to Misc->Misc Keys and configure the Exit button from there.

Although, I think this should work in ZSNES 1.42 as well (it's buried withing the same menu actually).

_________________
Continuing FF4 Research...


Sat Sep 23, 2006 2:21 pm
Profile
New Member

Joined: Sat Sep 23, 2006 1:42 pm
Posts: 5
Reply with quote
Post 
Beautiful!

I used what I think is his last build (0904)

Although I wasn't able to set the key through the UI for the same reason (When it asks you to bind a key, you actually press ESC to clear), the cfg file was MUCH more thorough, and I was able to set it there easily!

Thanks for the help!

Now all I need is the same functionality from Kega Fusion, Neopop, and VirtuaNES! =P


Sat Sep 23, 2006 4:02 pm
Profile
New Member

Joined: Mon Feb 05, 2007 1:13 am
Posts: 4
Reply with quote
Post 
Is there a way to program the "ESC" key in the latest version of ZSNESw151 to exit the emulator when pressed?

As organicjerk mentioned in the past, when you go to change the key assigned to exiting the emulator (binding a key) it says to press ESC to clear, thus preventing you from actually assigning the key to "ESC".

Is there a way maybe, to reassign the key to clear to a key other than "ESC", and then allow you to assign the "ESC" key to exit the emulator?

I know an older version of zsnes was adapted to use the "ESC" to exit the emulator, but I'd like to be able to use the most current version of zsnes, if possible.

Thanks in advance for any help.


Mon Feb 05, 2007 1:25 am
Profile
ZSNES Developer
ZSNES Developer

Joined: Tue Dec 28, 2004 6:47 am
Posts: 6747
Reply with quote
Post 
ratabase1 wrote:
Is there a way to program the "ESC" key in the latest version of ZSNESw151 to exit the emulator when pressed?

As organicjerk mentioned in the past, when you go to change the key assigned to exiting the emulator (binding a key) it says to press ESC to clear, thus preventing you from actually assigning the key to "ESC".

Is there a way maybe, to reassign the key to clear to a key other than "ESC", and then allow you to assign the "ESC" key to exit the emulator?

I know an older version of zsnes was adapted to use the "ESC" to exit the emulator, but I'd like to be able to use the most current version of zsnes, if possible.

Thanks in advance for any help.


Probably, but that's not ideal. ESC makes the most sense to cancel a key mapping.

_________________
Continuing FF4 Research...


Mon Feb 05, 2007 1:31 am
Profile
New Member

Joined: Mon Feb 05, 2007 1:13 am
Posts: 4
Reply with quote
Post 
Okay. Like Organicjerk, I'm trying to use this on arcade cabinet with multiple arcade and console emulators, and need to keep the key mappings all the same. Currently the "ESC" key is how you exit the other emulators and get back to my frontend menu. I just thought if there was a way to program another key other than "ESC" to clear a key, I'd be able to sync zsnes up with my other emulators on my cabinet, and use the "ESC" key for exiting.


Mon Feb 05, 2007 2:08 am
Profile
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3901
Location: Solar powered park bench
Reply with quote
Post 
Why not just load up ZSNES with -m?

_________________
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding


Mon Feb 05, 2007 2:51 am
Profile WWW
ZSNES Developer
ZSNES Developer

Joined: Tue Dec 28, 2004 6:47 am
Posts: 6747
Reply with quote
Post 
ratabase1 wrote:
Okay. Like Organicjerk, I'm trying to use this on arcade cabinet with multiple arcade and console emulators, and need to keep the key mappings all the same. Currently the "ESC" key is how you exit the other emulators and get back to my frontend menu. I just thought if there was a way to program another key other than "ESC" to clear a key, I'd be able to sync zsnes up with my other emulators on my cabinet, and use the "ESC" key for exiting.


I don't see how they are related. You can configure the ESC to a key via the cfg file by setting the key you are looking for to 1. That is how you work around this limitation. I don't see an issue really.

_________________
Continuing FF4 Research...


Mon Feb 05, 2007 3:03 am
Profile
New Member

Joined: Mon Feb 05, 2007 1:13 am
Posts: 4
Reply with quote
Post 
Deathlike2 wrote:
ratabase1 wrote:
Okay. Like Organicjerk, I'm trying to use this on arcade cabinet with multiple arcade and console emulators, and need to keep the key mappings all the same. Currently the "ESC" key is how you exit the other emulators and get back to my frontend menu. I just thought if there was a way to program another key other than "ESC" to clear a key, I'd be able to sync zsnes up with my other emulators on my cabinet, and use the "ESC" key for exiting.


I don't see how they are related. You can configure the ESC to a key via the cfg file by setting the key you are looking for to 1. That is how you work around this limitation. I don't see an issue really.


Okay, I'm trying to understand which setting you are talking about. Are you talking about in the zsnesw.cfg? If so, which setting exactly, are you referring to? Thanks in advance for your help.


Mon Feb 05, 2007 3:23 am
Profile
ZSNES Developer
ZSNES Developer

Joined: Tue Dec 28, 2004 6:47 am
Posts: 6747
Reply with quote
Post 
ratabase1 wrote:
Okay, I'm trying to understand which setting you are talking about. Are you talking about in the zsnesw.cfg? If so, which setting exactly, are you referring to? Thanks in advance for your help.


If you want to map a specific toggle to the ESC key, all you have to do is edit zsnesw.cfg, look for the appropriate toggle and change the value to 1.

For instance, let's just say you want to edit the quick key to exit immediately to use ESC.

In other words:
Code:
KeyQuickExit=1


So now, when you are running ZSNES while in game, hitting ESC quits ZSNES. You can do that for other keys as well.

_________________
Continuing FF4 Research...


Mon Feb 05, 2007 3:32 am
Profile
New Member

Joined: Mon Feb 05, 2007 1:13 am
Posts: 4
Reply with quote
Post 
Deathlike2 wrote:
ratabase1 wrote:
Okay, I'm trying to understand which setting you are talking about. Are you talking about in the zsnesw.cfg? If so, which setting exactly, are you referring to? Thanks in advance for your help.


If you want to map a specific toggle to the ESC key, all you have to do is edit zsnesw.cfg, look for the appropriate toggle and change the value to 1.

For instance, let's just say you want to edit the quick key to exit immediately to use ESC.

In other words:
Code:
KeyQuickExit=1


So now, when you are running ZSNES while in game, hitting ESC quits ZSNES. You can do that for other keys as well.


Okay. THanks. That works for me. I appreciate the quick response. I understand that the ESC key is 1. Are the numeric equivalents for the keyboard keys used in the cfg file ASCII codes? or is there a table or something that shows the numeric equivalent for all of the keys?


Mon Feb 05, 2007 3:55 am
Profile
ZSNES Developer
ZSNES Developer

Joined: Tue Dec 28, 2004 6:47 am
Posts: 6747
Reply with quote
Post 
They are scancodes. You can check the scancode used for each key on your keyboard by checking the value for each associated key entered. For example, look at my KeyQuickExit example. Change that key within the GUI, and the value in the cfg file will change accordingly. That's how you know the scancode for the key you just pressed.

_________________
Continuing FF4 Research...


Mon Feb 05, 2007 4:02 am
Profile
Inmate

Joined: Thu Jan 11, 2007 4:28 am
Posts: 1485
Location: Salem, Oregon
Reply with quote
Post 
the escape key is used to much in the interface, it would be better to just turn on the "control interface with gamepad" feature. this way you could close zsnes with your gamepad, problem solved.

_________________
byuu wrote:
Seriously, what kind of asshole makes an old-school 2D emulator that requires a Core 2 to get full speed? >:(


Mon Feb 05, 2007 6:47 am
Profile WWW
New Member

Joined: Sat Sep 23, 2006 1:42 pm
Posts: 5
Reply with quote
Post 
Panzer88 wrote:
the escape key is used to much in the interface, it would be better to just turn on the "control interface with gamepad" feature. this way you could close zsnes with your gamepad, problem solved.


Well for an arcade cabinet, you don't need/want to see the UI at all. In fact the experience should be so transparent that any visual existence of each emulator's UI destroys the seamless arcade experience.

Thus, using Esc (or whatever single key) to exit the emulator altogether (and return to YOUR UI with roms listed) is crucial.

In addition, most people nowadays use some sort of keyboard interface/hack to wire all of the arcade buttons for computer input, so depending on an external gamepad (which not all people make their cabinets support) in this application for exiting each emulator is not practical at all.


Wed Mar 21, 2007 12:22 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 14 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.