_jump_p    = ingame.kcp("Z");
_jump_r    = ingame.kcr("Z");
_dash      = ingame.kcp("C");
_attack    = ingame.kcp("X");
_left      = ingame.kc(vk_left);
_right     = ingame.kc(vk_right);
_up        = ingame.kc(vk_up);
_down      = ingame.kc(vk_down);
_inventory = ingame.kcp("I");
_focus     = ingame.kcp("A");

_return    = ingame.kcp(vk_escape); // for debugging

/*
if (ingame.kcp(vk_escape)) {
    autoreg_handle("title", "title", 100); 
}
if (title != undefined && title.kcp(vk_escape)) {
    autodel_handle("title"); 
}
*/
_newgame  = title.kcp(vk_space);
_continue = title.kcp(vk_enter);
_quitgame = title.kcp(vk_escape);

_left_inv = inventory.kcp(vk_left);
_right_inv= inventory.kcp(vk_right);
_up_inv   = inventory.kcp(vk_up);
_down_inv = inventory.kcp(vk_down);
_close    = inventory.kcp("I") || inventory.kcp(vk_escape);



if global.developer_mode && room == rTitle
{
	if _newgame
	{
		if (title != undefined) autodel_handle("title"); 
		
		global.save_data = get_default_save_data();
		save_game_to_disk();
		
		load_game_from_disk();
	}
	if _continue
	{
		if (title != undefined) autodel_handle("title"); 
		
		load_game_from_disk();
	}
	if _quitgame
		game_end();
}
if global.developer_mode && room != rTitle
	if _return
	{
		save_game_to_disk();
		room_goto(rTitle);
		
		with(global.camera) instance_destroy();
		with(global.player) instance_destroy();
		with(global.UI) instance_destroy();
		with(global.in_game_manager) instance_destroy();
		
		autoreg_handle("title", "title", 100);
	}
if _inventory
{
	global.inventory = icl(oInventory);
	autoreg_handle("inventory", "inventory", 10);
}
else if _close
{
	with(global.inventory) instance_destroy();
	autodel_handle("inventory");
}
