Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Key Input Overhaul Plugin

Author
Message
IronManhood
4
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 22nd Jun 2018 04:15 Edited at: 23rd Jun 2018 15:53
I wrote a plugin to allow getting input from all keys, including mouse forward/back buttons.

What is supported in this current version:



Edit: Updated the plugin with new features 06/22/2018
I also added the Windows64 bit version.

06/23/2018 - Fixed the 64 bit version.

Attachments

Login to view attachments
Santman
7
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 22nd Jun 2018 10:16
Not tried it yet, but if it works.....THANK YOU SO MUCH. lol
IronManhood
4
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 22nd Jun 2018 12:13
This changes things for windows only development. I was actually excited writing this lol.
basicFanatic
2
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 22nd Jun 2018 16:33
Just tried it. Way easy to use. This is PERFECT!
Ortu
DBPro Master
11
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 22nd Jun 2018 18:04 Edited at: 22nd Jun 2018 18:05
Awesome man, thanks for this

lol, F24 huh? handy for any of those old IBM keyboards still floating around...

http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Rick Nasher
1
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 22nd Jun 2018 21:22 Edited at: 22nd Jun 2018 21:24
Looks great!

Question:
-Is their a way to return the current state of the capslock key?

[EDIT]
-Is this only for 32bit? If so can you also provide a 64bit version?
IronManhood
4
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 22nd Jun 2018 22:08 Edited at: 22nd Jun 2018 23:29
Quote: "Awesome man, thanks for this

lol, F24 huh? handy for any of those old IBM keyboards still floating around..."


Lol..I just wanted to be thorough..


Quote: "Question:
-Is their a way to return the current state of the capslock key?

[EDIT]
-Is this only for 32bit? If so can you also provide a 64bit version?"


Question 1: Yes you can get the state of Caps lock, Num lock and scroll lock...If you have that key of course.
Question 2: I intend to make versions for all platforms. I tried with 64bit first and could not get the plugin to load at all. I need to figure out the issue there. As for linux and Mac, I'm not sure how to compile those. I need to do some research unless somebody can tell me.

I've included the 64 bit version.

Also, I uploaded an updated version today.
Heavens
4
Years of Service
User Offline
Joined: 10th May 2015
Location:
Posted: 23rd Jun 2018 07:51
Works great except the 64 bit version where I get:

Failed to load "" function from plugin "key_Input_Overhaul_Plugin"
Rick Nasher
1
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 23rd Jun 2018 08:21 Edited at: 23rd Jun 2018 08:38
Hmm, must be doing something wrong for when using the AppGameKit in 64bit mode I'm getting an error:
Failed to load "" function from plugin "Key_Input_Overhaul_Plugin"
(The empty quotes do appear literally like in above text)

In 32bit mode all fine though.

I've tried this in both the Steam version of AppGameKit and in the regular downloaded version.
Also tried deleting the 32bit dll and renaming the 64 bit, but no luck so far.
The filesizes seem a bit odd also:
Windows.dll - 199 KB
Windows64.dll - 1281 KB

Isn't that's a large difference in size?



[EDIT]
Quote: "-Is their a way to return the current state of the capslock key?"

I should have rephrased that:
Is there a way to return the *initial* state of the capslock?

I would like to know that, for I want to be able to use CursorUp /W-key for 'walking' and in combination with Shift for 'running' of the player.
Now holding that key when you prefer running can be annoying, so I would like people to be able to use CapsLock, which thankfully to your plugin should be feasible.
However, afaik there's no way to determine if the key is already 'On' when the game starts, so might give a bit of an odd situation:
One time it might be CapsLock LED indicates it's On, so should be running, but in fact was already On before starting the game so it's actually indicating 'walking' mode, which is confusing to the user if you know what I mean.

Apps such as Word do seem to be able to read the status ok so I suspect there should be a way to read the initial state?
(Might also be handy for the NumLock and ScrollLock keys)
IronManhood
4
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 23rd Jun 2018 10:36
Remove the Windows64.dll from the plugin and it should work fine on 32 bit. As for caps lock, num lock and scroll lock. For those keys, GetKey_State() returns whether or not they are toggled so if caps lock is enabled in windows then it will always return 1. GetKey_Pressed()/GetKey_Released() returns whether they have changed and are also pressed or not pressed respectively. Also, I implemented every key with toggle functionality. Just enable the specific key with the SetKey_Toggleable(int keycode, 1=Toggle, 0=Normal).

I'll be working on providing the rest of the plugin files except for mac as I don't have access to a macOS iso. Maybe someone on here can help out with that one.
IronManhood
4
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 23rd Jun 2018 15:56
I uploaded a new version which hopefully is the correct build for 64 bit. I was able to test this and confirm it works by toggling the 64 bit checkbox in preferences and removing Windows.dll from the project folder leaving Windows64.dll alone. I forgot to change from debug to release, that's why the file was bloated.
Rick Nasher
1
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 23rd Jun 2018 16:43 Edited at: 23rd Jun 2018 16:48
[EDIT]
Quote: "Remove the Windows64.dll from the plugin and it should work fine on 32 bit"

It's working ok on 32bit, just not under AppGameKit in 64bit mode(at least not for me).


In the meanwhile you've already fixed it, great stuff.

Quote: "As for caps lock, num lock and scroll lock. For those keys, GetKey_State() returns whether or not they are toggled so if caps lock is enabled in windows then it will always return 1. GetKey_Pressed()/GetKey_Released() returns whether they have changed and are also pressed or not pressed respectively. Also, I implemented every key with toggle functionality. Just enable the specific key with the SetKey_Toggleable(int keycode, 1=Toggle, 0=Normal)."


That's truly magnificent. Many thanks for that one, it's invaluable.
Rick Nasher
1
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 23rd Jun 2018 16:55
I can also see it correctly detects the CapsLock state at start. This was something really missing from AppGameKit and all keys are covered! Very, very good stuff.
PartTimeCoder
AGK Tool Maker
4
Years of Service
User Offline
Joined: 9th Mar 2015
Location: Suffolk UK
Posted: 23rd Jun 2018 17:24
Nice plugin, I like the toggle setting for all keys that's a dam good idea

I have not tried it yet but I see there's a KEY_MMB, does it also get the scroll state of the middle mouse?
IronManhood
4
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 23rd Jun 2018 17:42
Quote: "I have not tried it yet but I see there's a KEY_MMB, does it also get the scroll state of the middle mouse?"


No, I haven't decided on how to implement that yet.
Rick Nasher
1
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 24th Jun 2018 11:03
@PartTimeCoder:
Won't GetRawMouseWheel() and/or GetRawMouseWheelDelta() suffice for that?
IronManhood
4
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 25th Jun 2018 14:53 Edited at: 5th Jul 2018 09:51
Yeah so the linux version might take a while. I'm new to linux altogether and apparently getting key input is no trivial task. I need to do a bit of research.

Edit: I've decided to postpone Linux and mac versions. Until an undecided future date.

Login to post a reply

Server time is: 2019-06-18 02:58:03
Your offset time is: 2019-06-18 02:58:03