Godot Inputのロゴ

Godot Input

コミュニティ
EL4CTEO
godot-input

Input in Godot 4.7 for keyboard/mouse, gamepads and touch - InputMap actions, _input vs _unhandled_input, analog movement with deadzones, runtime rebinding with save/load, button prompts per device, gamepad vibration, gyro/accelerometer aiming (4.7), touch gestures and VirtualJoystick (4.7), mouse capture. Use for controls, key bindings, controller support or mobile touch input.

概要

公開者EL4CTEO
リポジトリgodot-skills
スキル名godot-input
スター
60
フォーク
6
同梱ファイル
1
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    EL4CTEOがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Godot Input」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-input
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/EL4CTEO/godot-skills.git /tmp/godot-skills
mkdir -p .claude/skills
cp -r /tmp/godot-skills/skills/godot-input .claude/skills/godot-input
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでGodot Inputを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にGodot Inputを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Godot Inputは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Input (4.7)

See the project's actions with python ../godot-core/scripts/project_inspect.py → input. Reuse those action names.

Actions, not keys

  • Define actions in Project Settings → Input Map (stored in project.godot [input]). Bind every action to keyboard and gamepad from day one. Use physical keycodes (physical_keycode) so WASD works on AZERTY.
  • Polling in _physics_process/_process: Input.is_action_pressed, is_action_just_pressed and is_action_just_released. Analog values: Input.get_vector(&"move_left", &"move_right", &"move_up", &"move_down") returns a circular deadzone and a normalized length. get_axis(neg, pos) and get_action_strength cover the rest.
  • Events: _unhandled_input(event) handles gameplay (UI gets first chance in _gui_input). _input sees everything first, so use it only for global hotkeys and mark them handled with get_viewport().set_input_as_handled(). _shortcut_input is for menus' shortcuts.
  • event.is_action_pressed(&"jump") inside event callbacks. Add allow_echo for key repeat, and exact_match to require exactly those modifiers.
  • 4.7: keyboard and mouse events report event.device == InputEvent.DEVICE_ID_KEYBOARD / DEVICE_ID_MOUSE, no longer 0. Gamepads keep 0..N. Don't compare device == 0 to mean "keyboard".
  • In C#, cache action names: static readonly StringName Jump = "jump";.

Gamepads

  • Hot-plug: Input.joy_connection_changed(device, connected), Input.get_connected_joypads(), Input.get_joy_name(device), Input.get_joy_info(device) (vendor and product IDs). SDL3 drives gamepads since 4.5.
  • Rumble: Input.start_joy_vibration(device, weak, strong, duration) and stop_joy_vibration. On phones, Input.vibrate_handheld(ms).
  • Motion sensors (4.7): has_joy_motion_sensors(d), set_joy_motion_sensors_enabled(d, true), then get_joy_gyroscope(d) (rad/s), get_joy_accelerometer(d) and get_joy_gravity(d). Calibrate with start_joy_motion_sensors_calibration/stop_.... Supported on Windows, Linux, macOS and iOS. Gyro aiming is in the reference.
  • Lights (DualShock/DualSense): has_joy_light, set_joy_light(device, color).
  • 4.7 setting input_devices/joypads/ignore_joypad_on_unfocused_application (default off) stops background controller input.
  • Several local players: give each player a device ID and read events filtered by event.device. The Input.* polling functions merge all devices, so poll per device with Input.get_joy_axis(device, axis) or route events yourself.

Rebinding

Change bindings at runtime with InputMap.action_erase_events/action_add_event, and save them yourself (ConfigFile with serialized events, see the reference). Load them at startup. InputMap.load_from_project_settings() resets to defaults. For button prompts, show event.as_text() for keys, or map JoyButton to your own icon set per controller family (detect it from get_joy_name).

Mouse

  • FPS look: Input.mouse_mode = Input.MOUSE_MODE_CAPTURED and InputEventMouseMotion.relative in _unhandled_input. Never use _process mouse deltas. Release the mouse on pause or Escape.
  • Input.use_accumulated_input = false (C#: UseAccumulatedInput) gives raw per-event motion for drawing apps. The default accumulation is fine for games.

Touch and mobile

  • InputEventScreenTouch (index, pressed, double_tap) and InputEventScreenDrag (relative, velocity). Gestures: InputEventMagnifyGesture and InputEventPanGesture.
  • input_devices/pointing/emulate_mouse_from_touch is on by default, so buttons work with touch. Turn emulate_touch_from_mouse on to test touch on desktop.
  • VirtualJoystick (4.7): set joystick_mode (FIXED, DYNAMIC or FOLLOWING), action_left/right/up/down (it feeds those actions, so get_vector just works), deadzone_ratio and visibility_mode = VISIBILITY_WHEN_TOUCHED. Signals: pressed, released, tapped, flicked.
  • TouchScreenButton (CanvasItem) triggers an action and supports multitouch. Regular Button is fine for menus.
  • Show touch controls only when touch is present: DisplayServer.is_touchscreen_available().

Testing input headless

Inject events in tests: Input.parse_input_event(ev), or Input.action_press(&"jump") / action_release. See godot-testing-debug.

Rebinding with persistence, device-aware prompts, gyro aim, touch camera (compiled by the tests): references/patterns.md

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Godot Input」では何ができますか?

Input in Godot 4.7 for keyboard/mouse, gamepads and touch - InputMap actions, _input vs _unhandled_input, analog movement with deadzones, runtime rebinding with save/load, button prompts per device, gamepad vibration, gyro/accelerometer aiming (4.7), touch gestures and VirtualJoystick (4.7), mouse capture. Use for controls, key bindings, controller support or mobile touch input.

TypingMindでGodot Inputを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Godot Inputはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにGodot Inputをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-inputを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Godot Inputを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Godot Inputで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもGodot Inputを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Godot Input」は無料ですか?

はい。EL4CTEOがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇