Input SDK ให้อินเทอร์เฟซแบบรวมที่ช่วยให้ผู้เล่น
ดูและเปลี่ยนการเชื่อมโยงเมาส์และแป้นพิมพ์สำหรับเกมที่ต้องการเล่น
บน Google Play Games บน PC ผู้เล่นสามารถเรียกใช้การวางซ้อนของ Google Play Games บน PC ได้ทุกเมื่อในระหว่างเล่นเกม ดังที่เห็นในภาพหน้าจอนี้
เกมที่ใช้แป้นพิมพ์ใน Google Play Games บน PC จำเป็นต้องใช้ SDK นี้เนื่องจากเกมในอุปกรณ์เคลื่อนที่ Android ออกแบบมาเพื่อใช้กับหน้าจอสัมผัสสำหรับการป้อนข้อมูลของผู้เล่น
เมื่อพัฒนาสำหรับ PC เกมต้องรองรับเมาส์และแป้นพิมพ์แทน คุณควรเปิดใช้ SDK นี้ใน Google Play Games บน PC เท่านั้น
Input SDK เป็นองค์ประกอบสำคัญที่จะทำให้ผู้เล่นพึงพอใจและมีส่วนร่วมกับเกมของคุณบนแพลตฟอร์มต่างๆ ประสบการณ์การใช้งานเมาส์และแป้นพิมพ์แตกต่างจากหน้าจอสัมผัส เมื่อคุณผสานรวมเกมของคุณ
เมื่อใช้อินพุต SDK คุณจะให้โปรแกรมเล่น
สามารถแมปการควบคุมเริ่มต้น
ใน Google Play Games บน PC
คุณใช้ประโยชน์จากฟีเจอร์การแมปแป้นใหม่ของ Google Play Games บน PC ได้มากขึ้นเพื่อประสบการณ์การใช้งานที่สมจริงยิ่งขึ้น โดยการตั้งค่าการควบคุมรูปแบบต่างๆ สำหรับเมนู เกมหลัก และมินิเกม หรืออัปเดต UI ให้ตรงกับแผนที่การควบคุมที่กำหนดเองของผู้ใช้ คุณสามารถปิดหรือเปิดใช้การแมปแป้นใหม่สำหรับแป้นแต่ละปุ่มหรือกลุ่มแป้น หรือเลือกแป้นที่อนุญาตให้แมปใหม่ในเกม
[[["เข้าใจง่าย","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 SDK\n\n| **Note:** Games that are played with only the left-mouse button are not required to integrate the Input SDK. These games are supported using with the [compatibility mode](/games/playgames/input#compatibility-mode). This document applies to all other games that need more than the left-mouse button.\n\nThe Input SDK provides a unified interface that allows players to\nview and change the mouse and keyboard bindings for any game they wish to play\non Google Play Games on PC. At any point during gameplay, a player can summon\nthe Google Play Games on PC overlay as seen in this screenshot:\n\nThis SDK is **required** for games that use keyboard on Google Play Games on PC\nbecause Android mobile games are designed around a touchscreen for player input.\nWhen developing for PCs, games need to support a mouse and keyboard instead. You\nshould only enable this SDK on Google Play Games on PC.\n| **Note:** For information about the other Google Play Games on PC requirements, see [Get started with Google Play Games on PC](/games/playgames/start).\n\nThe Input SDK is an important element for keeping players happy and\nengaged with your game on different platforms. The experience afforded by\na mouse and keyboard is different from touchscreens. When you integrate your game\nwith the Input SDK you will enable players to remap the default controls\nin Google Play Games on PC.\n\nFor a more immersive experience, you can take more advantage of the remapping\nfeature offered by Google Play Games on PC by setting different scheme controls\nfor your menus, main game and minigames, or by updating your UI to match your\nuser's custom control maps. You can disable or enable remapping for individual\nkeys or groups of keys, or decide what keys are allowed to be remapped in your\ngame.\n\nWhen using the remapping feature, Android will detect when the user is typing text\ninto a text field and disable remapping, so your game doesn't have to\nmanually disable remapping for these scenarios.\n\nFor more information, see [best practices](/games/playgames/input-sdk-start#input-sdk-best-practices)\nand [restrictions](/games/playgames/input-sdk-start#remapping-restrictions) of the Input SDK to help build the best PC experience possible for your game.\n\nIntegration guide\n-----------------\n\nFor information about integrating the Input SDK, see\n[Get started with the Input SDK](/games/playgames/input-sdk-start).\n\nSample games\n------------\n\nFor examples of how to integrate with the Input SDK, see\n[AGDK Tunnel](https://github.com/android/games-samples/tree/main/agdk/agdktunnel)\nfor Kotlin or Java games and\n[Trivial Kart](https://github.com/android/games-samples/tree/main/trivialkart/trivialkart-unity)\nfor Unity games.\n\nDownload the Input SDK\n----------------------\n\nBefore you download the Input SDK, read the following Google Input SDK terms of service and data collection requirements.\n\n### Google APIs Terms of Service\n\nThe [Google APIs Terms of Service](https://developers.google.com/terms) governs\nyour use of the Google Input SDK.\n\n### Data collection\n\nThe Google Input SDK may collect performance and stability data to\nimprove our product, including the following data:\n\n- Number of calls to the Input SDK methods.\n- Number of non-successful calls to Input SDK methods.\n- InputMap aggregated information like:\n - Number of defined actions and groups.\n - Number of defined single-key, multi-key and mouse actions.\n - Number of defined mouse actions.\n - Number of remappable actions and groups.\n - Number of remapping-reserved keys.\n - InputMap remapping option (enabled/disabled).\n- Game's package name.\n- Game's version number.\n- Game's version name.\n- Input SDK version.\n- Client variants such as Google Play Games on PC or other clients.\n\nThe Input SDK is\n[available on the Google Maven Repository](https://maven.google.com/web/index.html#com.google.android.libraries.play.games:inputmapping).\nSee the [Getting Started Guide](/games/playgames/input-sdk-start#adding-the-sdk) for instructions\non how to your Java or Kotlin project.\n\nDownload the Input SDK for Unity from the\n[Play Unity Plugins repository](https://developers.google.com/unity/packages#input_sdk)."]]