code: function handle1dkeys (keys, value, step, min, max) {
  	step = step || 1;
  
  	//up and right - increase by one
  	if (keys[38] || keys[39]) {
  		value = inc(value, step, 1);
  	}
  
  	//down and left - decrease by one
  	if (keys[40] || keys[37]) {
  		value = inc(value, step, -1);
  	}
  
  	//home - min
  	if (keys[36]) {
  		value = min;
  	}
  
  	//end - max
  	if (keys[35]) {
  		value = max;
  	}
  
  	//pageup
  	if (keys[33]) {
  		value = inc(value, step, PAGE);
  	}
  
  	//pagedown
  	if (keys[34]) {
  		value = inc(value, step, -PAGE);
  	}
  
  	return value;
  }
docs: Apply pressed keys on the 1d value