Page 1 of 1

NumPad Movement

Posted: Wed Jul 11, 2012 6:02 pm
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!

Re: NumPad Movement

Posted: Sat Aug 24, 2013 5:03 am
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 :)

Re: NumPad Movement

Posted: Tue Oct 07, 2014 9:34 am
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>

Re: NumPad Movement

Posted: Tue Oct 07, 2014 1:35 pm
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.