<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[GMan's Mods & Stuff — Key events how do i stop the delay]]></title>
	<link rel="self" href="https://gprogs.com/extern.php?action=feed&amp;tid=287&amp;type=atom" />
	<updated>2007-11-21T22:25:51Z</updated>
	<generator>PunBB</generator>
	<id>https://gprogs.com/viewtopic.php?id=287</id>
		<entry>
			<title type="html"><![CDATA[Re: Key events how do i stop the delay]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1145#p1145" />
			<content type="html"><![CDATA[<p>Ive looked through your &quot;globals&quot; and I think im close, but no joy yet, im getting a cannot convert message, when i change to ieventreciever i get iskeydown is not found:<br />Using irrlicht.ib3d</p><div class="codebox"><pre><code>Local keyevent:ib3d_EventReceiver = ib3d_EventReceiver.generate()

While device.run()

    If keyevent.IsKeyDown( EKEY_KEY_W )
        device.drop
        End
    EndIf</code></pre></div><p>Back to tryin&#039; <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>----EDIT------</p><p>ARGH!!!!&nbsp; &nbsp; Nevermind <img src="https://gprogs.com/img/smilies/tongue.png" width="15" height="15" alt="tongue" /> </p><p>ib3d_keydown() !!!!!</p><p>(I feel like an engineer who has just spent an evening wondering why the device isnt working and then realising it aint plugged in!!!)</p>]]></content>
			<author>
				<name><![CDATA[danman]]></name>
				<uri>https://gprogs.com/profile.php?id=219</uri>
			</author>
			<updated>2007-11-21T22:25:51Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1145#p1145</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Key events how do i stop the delay]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1141#p1141" />
			<content type="html"><![CDATA[<p>greetings <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; because the window is instantiated by Irrlicht you cant use the built-in event system of BlitzMax.&nbsp; there is a type in the addons pack called smootheventreceiver.&nbsp; use this code to help emulate the behaviour of the BlitzMax event system.&nbsp; just an FYI, this event mechanism is built into iB3D (i noticed youve been playing with it in another thread).</p>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2007-11-21T01:56:04Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1141#p1141</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Key events how do i stop the delay]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1138#p1138" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Local receiver:IEventReceiver=IEventReceiver.create(MyEventReceiver.generate)
Type MyEventReceiver Extends IEventReceiver

    Method OnEvent:Int(event:SEvent)
        If (event.getEventType()=EET_KEY_INPUT_EVENT )
            Local key:Int=event.getKeyinputkey()
                Case EKEY_KEY_D
                    Local v:Vector3df=ship.getPosition()
                    v.setY(v.getY()-2.0)
                    ship.setPosition(v)
                    Return True
                Default
                    Return False
            EndSelect
        EndIf
        Return False

    EndMethod
    
    &#039; we must override the generate function in order for instantiation to work properly
    Function generate:IEventReceiver()
        Return New MyEventReceiver
    EndFunction
EndType</code></pre></div><p>Hi,</p><p>Here is some event code hijacked from the example. How do i stop the keyboard using the typing delay when i press the key ??</p><p>I found the method: getKeypresseddown() on the irrlicht forums but it doesnt seem to work.</p><br /><br /><p>I would prefer not to use an event system at all, but instead use the keydown() and keyhit() but they are not working when im using the irrlicht mod</p>]]></content>
			<author>
				<name><![CDATA[danman]]></name>
				<uri>https://gprogs.com/profile.php?id=219</uri>
			</author>
			<updated>2007-11-18T14:49:37Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1138#p1138</id>
		</entry>
</feed>
