Int Function GetSneakKey() ; まず自動モードで取得してみる Int iKeyCode = Input.GetMappedKey("Sneak", 0xFF) if iKeyCode != -1 return iKeyCode endif ; ダメだったらゲームパッドモードで iKeyCode = Input.GetMappedKey("Sneak", 0x02) if iKeyCode != -1 return iKeyCode endif ; ダメだったらキーボードモードで iKeyCode = Input.GetMappedKey("Sneak", 0x00) if iKeyCode != -1 return iKeyCode endif ; それでもダメだったらゲームパッドの下ボタンを使う return 267 EndFunction