Sign in to follow this  
Schwanke

Alt-F4 still bound to exit.

Recommended Posts

Alt-F4 is still hard coded to exit and I could not find a place in the interface to change it to something else.


 


I Use Alt F1-F10 for my skill trackers so every time I do Alt-F4 it loads my 4th skill tracker as well as gives me a do you wish to exit pop up.


 


I know Alt-F4 is the default exit in windows but I know it can be intercepted and reprogrammed. Be nice for the client coder to do so. :)


Share this post


Link to post
Share on other sites

by default Atlf+F4 wlll trigger the exit confirm window.


 


You can also bind it in another function (on windows works). What is your OS?


Share this post


Link to post
Share on other sites

Yah that was what I said hehe. I am saying Id like wurm to intercept it and treat it like a configurable option like all the others.


 


I'm windows 8.


Share this post


Link to post
Share on other sites

Ehhh, that would be next to impossible.


Its a "safety" measure so you can always close rogue applications (virus, mouse grabbing malware, etc, etc). Its the equivalent of Ctrl-Alt-Del, which is hardcoded in the OS to be intercepted by Windows. No application can overide this.


Share this post


Link to post
Share on other sites

Then why does it pop up an ingame window? Obviosly wurm is 'detecting it' enough to give its own pop up, not some windows pop up.  All someone would have to do is instead of popping up the wurms pithy logout menues just check if its actually bound to exit and if it is let it through if its not, dont.


Share this post


Link to post
Share on other sites

Ehhh, that would be next to impossible.

Its a "safety" measure so you can always close rogue applications (virus, mouse grabbing malware, etc, etc). Its the equivalent of Ctrl-Alt-Del, which is hardcoded in the OS to be intercepted by Windows. No application can overide this.

 

I'm afraid you've been misinformed.  The Alt+F4 combination is just something developers tend to respect when creating applications.  If what you said was true then the Wurm client would /reallyquit and not just pop-up an in game dialogue.

 

Ctrl+Alt+Del is indeed hard-coded but both ctrl+alt+del and alt+f4 may be disabled within the OS for use in kiosk systems (e.g. PC stores, information points etc).

Share this post


Link to post
Share on other sites

I think the problem is mostly that alt+f4 is "the standard" for closing application. That means you don't have to tell most users what alt+f4 does. When you start changing the functionality of alt+f4, it sort of goes against the intuition most people have.

At the other hand it's possible to make it an option, but I feel like it'd just be easier to change the binds to actual numbers perhaps, instead of the F keys.

  • Like 1

Share this post


Link to post
Share on other sites

Numbers are already used for the current toolbar for improving. pick tool with 1-5, e for improve. Lets me do an imp session completely left handed :D


Share this post


Link to post
Share on other sites

ALT-F4 closing the window is likely a feature of the OS rather than the wurm client. You need to disable or change that ALT-F4 is the short cut for close window in your window manager.


Edited by xzea

Share this post


Link to post
Share on other sites

ALT-F4 is not a direct closing, it is a Closing Request, a bit similar to SIGINT on POSIX system.


 


When someone press that combo it is a shortcut to the default Exit Function. In this case "Quit" is the function called (Exit confirm).


 


Yes could be bypassed but I think is better avoid that.


  • Like 1

Share this post


Link to post
Share on other sites

So can wurm detect that it was Alt-F4 that was pressed? To get the quit? Or does it only know that quit was registered?


 


If wurm can tell then wurm should fix it but if wurm cant tell then I assume its up to me to fix it.


 


How do I tell one particular program in windows that I want to disable Alt-F4?

Share this post


Link to post
Share on other sites

So can wurm detect that it was Alt-F4 that was pressed? To get the quit? Or does it only know that quit was registered?

 

If wurm can tell then wurm should fix break it but if wurm cant tell then I assume its up to me to fix break it.

Fixed that for you.

A regular Windows application can intercept the Alt-F4 message, ignore that it's a system shortcut and do something else like handle it like a normal key. However I'm not sure if Java or LWJGL allows this at all.

How do I tell one particular program in windows that I want to disable Alt-F4?

You can't. The developers could do that if they decided to ignore those standards.

There's probably a way to use a keyboard hook dll which is then preloaded when applications are started. So maybe someone has already created such a beast.

Share this post


Link to post
Share on other sites

Fixed Break that for you.

A regular Windows application can intercept the Alt-F4 message, ignore that it's a system shortcut and do something else like handle it like a normal key. However I'm not sure if Java or LWJGL allows this at all.

You can't. The developers could do that if they decided to ignore those standards.

There's probably a way to use a keyboard hook dll which is then preloaded when applications are started. So maybe someone has already created such a beast.

Share this post


Link to post
Share on other sites

It'd be pretty silly to "intercept" alt+f4, you can probably just see if alt and f4 are pressed when the closing window shows up. I don't think implementation is the issue, it's just the "should we really do this?"

  • Like 1

Share this post


Link to post
Share on other sites

Pretty much a standard coding convention to keep it the way it is.


 


A hardware analogy would be swapping the functions of buttons labeled with a green triangle and a red square respectively. It can be done, just not a good idea from a gui design perspective.


Share this post


Link to post
Share on other sites

Kind of an "old" thread to reply to, but as others have said it IS possible, but it's an incredibly silly thing to do as Brqqq mentioned.


 


Java will receive the exit command on Alt-F4 and allow applets/apps (wurm in this case) to handle it safely as opposed to immediately exiting like when you Ctrl-alt-del end task (or sigkill vs. sigterm).


 


Alt-f4 is a pretty standard understanding among applications to request an exit which is why the signal is handed from Java to the code instead of a developer needing to implement Alt-F4 in order for any action to happen.


 


In the case of Wurm, it handles this close request with a confirmation to make sure a player REALLY intended to exit. A typical app may prompt to stop confirming in the future. I've yet to see an application allow someone to ignore Alt-F4 though.. That would be..odd.


Share this post


Link to post
Share on other sites

old? your reply wasnt even a month after the last reply ;)

why do people keep going on about how its silly or what not?

the op's question was simple

can it be made possible to change the function of alt+f4 in the configs so that in his case he can use alt+f4 as a keybind key without the confirmation window to popup

in all honestly it should be pretty simple to add a setting in the configs that if the box is ticked alt+f4 will ask you to close it and if its not ticked then dont do it?

you wanna know an app that ignores alt+f4? try 90% of fps games or rts games or moba's if you have yet to come across an application or game that ignores alt+f4 i suggest you broaden your horizons as more often then not i come across games or programs that rely on a lot of shortcuts that have alt+f4= close disabled by default


especially in fps games its disabled for the simple fact that in older fps games people would use hacks to send the alt+f4 command to players on the enemy team thus resulting in their games closing allowing that other team to win so now days its disabled



anyways how hard would it be to give players the ability to disable alt+f4= close confirmation window as an toggable option in the configs?

Share this post


Link to post
Share on other sites

Haha win. +1. (And I never get to use he +1 :D)


 


I totally forgot about that and thats the whole point. Remapping hot keys for fps. Just wurm isnt so much a fps as a fpc (First person crafter. :D)


 


Thank you!


  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this