The Daily Click ::. Forums ::. Klik Coding Help ::. Using the F1-F12 buttons for Hotkeys
 

Post Reply  Post Oekaki 
 

Posted By Message

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
28th July, 2008 at 00:34:15 -

Hi guys, sorry I don't have my MMF1.5 in front of me at the moment but I was wondering if there's a way for the program to accept input for all twelve "F" keys without it doing it's default execution during runtime (ex. I think pressing F2 restarts the application, but I'd want it to do something else.)

I have twelve things in my game I want hooked up to hotkeys to make it easier for the player, and if I could use the F1-F12 keys that would be excellent.

Thank you

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
28th July, 2008 at 08:33:23 -

That's a good point, I've never tried using the F12 buttons before and when I just tried then it wouldn't accept them. As a workaround, I guess you could use an extension such as ControlX (I think there might be better stuff to use somewhere) to check for the Function buttons. You would also need to turn off F2 as restart in the file menu.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
28th July, 2008 at 10:52:59 -

As long as you remove the "accelerator" in the menu, it will work fine without any extensions (unless that's just mmf2?).

Image Edited by the Author.

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
28th July, 2008 at 13:24:25 -

I don't know where or what the accelerator is, so it might just be in MMF2
I have ControlX already somewhere, I'll look into that option. It just seemed to make sense in my case. I think having the function keys work in MMF would be very helpful for hotkeys or as item slots for an RPG game's inventory. Thank you for your help!

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
28th July, 2008 at 16:57:24 -

I thought if you removed the menu references and then programmed specific functions for the buttons it would override their normal ones. O_o I could be wrong, however.

 

  		
  		

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
1st August, 2008 at 12:36:26 -

DAMNIT SOOOO CLOSE!

Well, your suggestions worked for all but ONE STINKING FUNCTION KEY!

The problem is the F10 key, which pauses the application. There seems to be no way to disable this feature from anything I see in MMF, so I wonder if this is a windows thing instead? I tried using the Control X object to go around it (you can't even enter "F10" in the keypress command line) but it too fails.

Everything works so well, but if I can't use F10 I can't use the other 11 keys. Any ideas of an object I could use aside from Control X, or if there's another way to disable the F10 key from pausing the game?

Help!!

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
2nd August, 2008 at 04:33:53 -

That's what happened to me when I tried. I didn't realize it was only F10 that doesn't work. It was the only one I tried, where as the other ones work, as you mentioned.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
2nd August, 2008 at 10:46:38 -

I doubt it. Tried the same thing last month. For a rather stupid workaround, you could just.. not use the keys, or use only F1-F8. You'll have to rely on an extension, I think.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
2nd August, 2008 at 12:47:18 -

Ah man, it just seemed so perfect.. 12 items that need hotkeys, 12 function buttons.. I guess I could have it so that the player has to select 4 out of 12 items for hotkey shortcuts and they could just use F1-F4.

Okay, thank you for trying everybody

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
4th August, 2008 at 16:06:59 -

There is a solution to the F10 problem;

Use winmessagepro extension;

+ start of frame
>>> stat intercepting messages

+ on message of type 260
+ wparam = 121
+ only one action when event loops
>>> whatever you want to happen when f10 is pressed
>>> set current message as handled


* message 260 = WM_SYSKEYDOWN (meaning either f10 or alt are down)
* wparam specifies the virtual key code of the last key pressed (121 refers to f10, so the alt key is unaffected).

Image Edited by the Author.

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
5th August, 2008 at 21:40:06 -

Damn, that's mighty impressive Sketchy. Is that extension for MMF1.5?
I'm going to try and locate it now.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
5th August, 2008 at 21:49:36 -

Found it, but it costs $10 for the commercial license. I don't know if I want to spring a third of my game donatations for something I'd only most likely need for one thing

Any other way to do it that you know of?

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
6th August, 2008 at 00:20:29 -

Err, It's quite easy in MMF2. Not sure about 1.5 though. Just take out the menu's!

 
Craps, I'm an old man!

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
7th August, 2008 at 19:19:10 -

I ended up having the player select 3 hotkeys from the items of his choosing instead and it works.

Thank you for all your help

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
11th August, 2008 at 20:11:11 -

To be clear about this: F10 is a reserved Windows key to open the menu. Press down after having pressed F10 and you'll see what I mean...

 
Old member (~2004-2007).
   

Post Reply



 



Advertisement

Worth A Click