rem: Input.handleInput(m_state); 
add: Input.handleInput(m_state.clone()); 
context:     function handleDevKey(e, keyDev)    {      var dev,m_state,old,pressed,k;      // map keyboard dev no to real dev no      assert(function(){return ((keyDev>=0)&&(keyDev<2));});      dev=Input.keyDevMap[keyDev];      assert(function(){return typeof Input.devState != "undefined";});      assert(function(){return ((dev>=0)&&(dev<Input.devState.length));});        m_state=Input.devState[dev];      old=m_state.xxx();      pressed=e.state;      k=e.sym;      if (k==Input.keys[keyDev][0]) {	// up	if (pressed) m_state.y=1;	else if (m_state.y==1) m_state.y=0;      }else if (k==Input.keys[keyDev][1]) {	// down	if (pressed) m_state.y=-1;	else if (m_state.y==-1) m_state.y=0;      }else if (k==Input.keys[keyDev][2]) {	// left 	if (pressed) m_state.x=-1;	else if (m_state.x==-1) m_state.x=0;      }else if (k==Input.keys[keyDev][3]) {	// right	if (pressed) m_state.x=1;	else if (m_state.x==1) m_state.x=0;      }else if (k==Input.keys[keyDev][4]) {	// button 1	if (pressed) m_state.buttons|=1;	else m_state.buttons&=~1;      }else if (k==Input.keys[keyDev][5]) {	// button 1	if (pressed) m_state.buttons|=2;	else m_state.buttons&=~2;      }      if ((m_state.x!=old.x)||(m_state.y!=old.y)||(m_state.buttons!=old.buttons)) {	Input.handleInput(m_state);	return true;      }      return false;    }
meta: 8182	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8182/ab1549e88031263baef0d6911b4f19a93176370d/input.js/buggy/egachine/src/modules/input/input.js