このトピックでは、PC 版 Google Play Games でユーザー入力を処理する場合の設計上の考慮事項とおすすめの方法について説明します。
PC 版 Google Play Games では、プレーヤー入力にマウスとキーボードを使用し、タッチスクリーンは使用しません。マウスとキーボードのエクスペリエンスを設計する際は、デスクトップ パソコンまたはノートパソコンのユーザーに対して最適なユーザー エクスペリエンスを構築することに注力します。設計を開始するには、Chromebook での Android アプリの入力互換性に関するガイドをご覧ください。
海外のユーザーを対象としたゲームを設計する場合は、ゲームでサポートされている各言語にキーボード レイアウトを設定して、ゲームをテストすることが重要です。これを行わないと、ゲーム内チャットなどの機能が使用できなくなる可能性があります。入力ロケールはシステム設定で変更できます。変更は PC 版 Google Play Games に自動的に適用されます。モバイルでは、仮想キーボードからテキストを受け取っているため、エンジンの多くの問題が隠されている可能性があります。パソコンでよく発生する問題は次のとおりです。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 UTC。"],[],[],null,["# Input support\n\nThis topic covers design considerations and best practices for handling user\ninput in Google Play Games on PC.\n\nGoogle Play Games on PC relies on a mouse and keyboard for player input rather\nthan a touchscreen. When designing your mouse and keyboard experience, focus on\nbuilding the best user experience for desktop or laptop PC users. To get\nstarted, see our guide on\n[Android app input compatibility for Chromebooks](/topic/arc/input-compatibility).\n\nBest practices\n--------------\n\nWe recommend the following best practices for designing and building player\ninteractions.\n\n- All targets should be clickable with a mouse.\n- All scrollable surfaces scroll on mouse wheel events.\n- Highlight clickable surfaces when hovered, and use your best judgment to improve UI discovery without overwhelming the user.\n- Provide hotkeys for users to quickly bring up controls.\n- Replace touch-based controls (for example, thumb joysticks or on-screen buttons) with mouse-based controls and hotkeys.\n- For actions in your mobile game that require multi-touch gestures, ensure the same actions are supported with a keyboard or mouse control (for example, using the scroll wheel of the mouse to replace a two-finger pinch).\n\nFor additional details and best practices, see our guide on\n[optimizing your ChromeOS Android app for mouse and keyboard](/topic/arc/optimizing#keyboard).\n\n### Internationalization considerations\n\nWhen designing a game for an international audience, it is important that you\ntest your game with your keyboard layout set to each language supported by your\ngame. Failure to do so may block players from using features such as in-game\nchat. You can change your input locale\n[in your system settings](https://support.microsoft.com/en-us/windows/manage-the-input-and-display-language-settings-in-windows-12a10cb4-8626-9b77-0ccb-5013e0c7c7a2)\nand the changes will apply automatically to Google Play Games on PC. On\nmobile, many issues in your engine may be hidden by the fact that you're\nreceiving text from a virtual keyboard. Common issues on PC include:\n\n- Incorrect handling of \"alternative graphic\" (AltGr) keycodes. In many locales this is used to type diacritical marks such as accents or special locale-specific symbols such as regional currency glyphs.\n- Incorrect handling of [\"input method extension\" (IME)](/reference/android/view/inputmethod/InputMethodManager) inputs. This method is commonly used to support non-Latin alphabets by allowing users to combine several keystrokes into a single character.\n\n[`GameTextInput`](/games/agdk/add-support-for-text-input) and\n[`EditText`](/reference/android/widget/EditText) are already aware of\ninternational keyboard layouts and input methods.\n\n### Recommended input mappings\n\nThe following list includes actions many games have in common, and the typical\nimplementation developers use on Google Play Games on PC:\n\n- Use the enter key to send messages or submit text in text entry fields.\n- Menus and dialogs should be cancellable with the escape key.\n- Use the enter key to progress through story elements and dialog boxes.\n- Use the scroll wheel to scroll text vertically.\n- Use the scroll wheel to zoom in or out, especially if you use a two-finger pinch in your mobile build.\n- Use W, A, S, and D navigate around a map that you'd normally use a click and drag motion on.\n\nEven though these actions are common, you should still explicitly present them\nto the player with the [Input SDK](/games/playgames/input-sdk) to make sure they're\nproperly discoverable.\n\nCompatibility mode\n------------------\n\nGoogle Play Games on PC places your game into \"input compatibility mode\" by\ndefault. This means that when you press the left mouse button, your game is\ngiven a touch event. See the [mouse input](/games/playgames/input-mouse) guide for more\ninformation.\n\nTutorials and user education\n----------------------------\n\nIn some cases, users can benefit from in-game tutorials that teach them the\ncontrols to the game, in addition to being able to view the mouse and keyboard\ncontrols. We recommend including in-game tutorials and educational features with\nthe correct controls for mouse and keyboard, and removing tutorials relevant to\ntouch-based controls for the PC version of your game."]]