ID:266895
 
I've scoured the f1 in-program help in DM and am wondering if there is anyway to bind procs/verbs to keypresses. Like having just press 'A' to do something, or perhaps Ctr, Space or even NumLock or Home? I haven't seen anything that would allow me to poke() or peek(), nor check internal memory for any sort of scan codes?

Perhaps there is someway I could do it with client/macro? I've tested out a couple of ideas I had to get it to work, but they didn't work as I had wanted them to.
Make a script file(.dms)

To set up just do this,

macro
a return "proc/verb here with out ()"
command_text = ".alt "

The command_text is so they dont have to hold alt
Orochi p_fish wrote:
I've scoured the f1 in-program help in DM and am wondering if there is anyway to bind procs/verbs to keypresses. Like having just press 'A' to do something, or perhaps Ctr, Space or even NumLock or Home? I haven't seen anything that would allow me to poke() or peek(), nor check internal memory for any sort of scan codes?

Perhaps there is someway I could do it with client/macro? I've tested out a couple of ideas I had to get it to work, but they didn't work as I had wanted them to.

You can't really do this now, although you can define server-side macroes for them(as shown in the post above).

Better keyboard control is on The List(I believe), but I don't believe its top priority right now.

Alathon\\
In response to Super16
But they still have to type 'a' then hit the enter key, correct? I'm trying to have 'a' do something without the user having to press the enter key.
In response to Alathon
One thing I like about BYOND is it's ease to slip into, it's a lot like BASIC in that respect, but unlike BASIC, It doesn't support me 'going under the hood' and making my own tweaks. Like doing a little assembly in C/C++.
In response to Super16
Super16 wrote:
Make a script file(.dms)

To set up just do this,

macro
a return "proc/verb here with out ()"
command_text = ".alt "

The command_text is so they dont have to hold alt

Okay, I've got a couple of keys working.

This is what my .dms file looks like:
command_text = ".alt"
alias
   escape return "quit"
   space return ".center"
macro
   escape return "quit"
   space return ".center"


Of course, quit was a verb that the mob/pc had and .center referred to the client.center() proc. Just hitting the keys would execute the correct scripts. This adds at least two more one-stroke commands directly from the keyboard.