NumPad Movement

Share your scripts and packages with other Mudlet users.
Post Reply
User avatar
Oneymus
Posts: 321
Joined: Thu Sep 17, 2009 5:24 am

NumPad Movement

Post by Oneymus »

A simple package for enabling movement via the keypad. Someone in the IRC was asking after it, and Demonnic and I decided, since it's a commonly requested thing, I'd go ahead and post mine.

Hope it helps!
Attachments
NumPad.trigger.xml
(4.59 KiB) Downloaded 2392 times

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: NumPad Movement

Post by Belgarath »

This is an easily added script to add whenever I start a new MUD - saves me the trouble of writing it up myself. Thanks for this :)

User avatar
Zaphob
Posts: 180
Joined: Wed May 09, 2012 8:07 am
Location: mg.mud.de

Re: NumPad Movement

Post by Zaphob »

Thanks guys, this seems interesting!

I found it through the wiki: http://wiki.mudlet.org/w/Keybindings

Is there any way to understand which keyCode / keyModifier relates to which button on Keyboard?

Following is the Lua code again for your comparison.
Code: [show] | [select all] lua
<KeyPackage>
        <KeyGroup isActive="yes" isFolder="yes">
            <name>Keypad</name>
            <script></script>
            <command></command>
            <keyCode>-1</keyCode>
            <keyModifier>-1</keyModifier>
            <Key isActive="yes" isFolder="no">
                <name>North</name>
                <script></script>
                <command>north</command>
                <keyCode>56</keyCode>
                <keyModifier>536870912</keyModifier>
            </Key>
            <Key isActive="yes" isFolder="no">
                <name>Scan</name>
                <script></script>
                <command>scan</command>
                <keyCode>48</keyCode>
                <keyModifier>536870912</keyModifier>
            </Key>
            <Key isActive="yes" isFolder="no">
                <name>Where</name>
                <script></script>
                <command>where</command>
                <keyCode>53</keyCode>
                <keyModifier>536870912</keyModifier>
            </Key>
            <Key isActive="yes" isFolder="no">
                <name>Down</name>
                <script></script>
                <command>down</command>
                <keyCode>43</keyCode>
                <keyModifier>536870912</keyModifier>
            </Key>
            <Key isActive="yes" isFolder="no">
                <name>Up</name>
                <script></script>
                <command>up</command>
                <keyCode>45</keyCode>
                <keyModifier>536870912</keyModifier>
            </Key>
            <Key isActive="yes" isFolder="no">
                <name>Southwest</name>
                <script></script>
                <command>southwest</command>
                <keyCode>49</keyCode>
                <keyModifier>536870912</keyModifier>
            </Key>
            <Key isActive="yes" isFolder="no">
                <name>Southeast</name>
                <script></script>
                <command>southeast</command>
                <keyCode>51</keyCode>
                <keyModifier>536870912</keyModifier>
            </Key>
            <Key isActive="yes" isFolder="no">
                <name>Northwest</name>
                <script></script>
                <command>northwest</command>
                <keyCode>55</keyCode>
                <keyModifier>536870912</keyModifier>
            </Key>
            <Key isActive="yes" isFolder="no">
                <name>Northeast</name>
                <script></script>
                <command>northeast</command>
                <keyCode>57</keyCode>
                <keyModifier>536870912</keyModifier>
            </Key>
            <Key isActive="yes" isFolder="no">
                <name>West</name>
                <script></script>
                <command>west</command>
                <keyCode>52</keyCode>
                <keyModifier>536870912</keyModifier>
            </Key>
            <Key isActive="yes" isFolder="no">
                <name>East</name>
                <script></script>
                <command>east</command>
                <keyCode>54</keyCode>
                <keyModifier>536870912</keyModifier>
            </Key>
            <Key isActive="yes" isFolder="no">
                <name>South</name>
                <script></script>
                <command>south</command>
                <keyCode>50</keyCode>
                <keyModifier>536870912</keyModifier>
            </Key>
            <Key isActive="yes" isFolder="no">
                <name>Scan</name>
                <script></script>
                <command>scan</command>
                <keyCode>53</keyCode>
                <keyModifier>536870912</keyModifier>
            </Key>
        </KeyGroup>
    </KeyPackage>

User avatar
Oneymus
Posts: 321
Joined: Thu Sep 17, 2009 5:24 am

Re: NumPad Movement

Post by Oneymus »

That is not the Lua code. That's the XML package Mudlet uses for exporting/importing. If you add this package to your profile in Mudlet, you'll be able to inspect it via the UI, which will give you the information you need.

Post Reply