ঘোষণা :
15 এপ্রিল, 2025 এর আগে আর্থ ইঞ্জিন ব্যবহার করার জন্য নিবন্ধিত সমস্ত অবাণিজ্যিক প্রকল্পগুলিকে অবশ্যই আর্থ ইঞ্জিন অ্যাক্সেস বজায় রাখার জন্য
অ-বাণিজ্যিক যোগ্যতা যাচাই করতে হবে।
ui.root.setKeyHandler
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
একটি পূর্বনির্ধারিত কী সহ রুট প্যানেলে একটি কীডাউন ইভেন্ট হ্যান্ডলার সেট করে। একজন ব্যবহারকারী আবদ্ধ কী কমান্ড চাপলে হ্যান্ডলারটি শুধুমাত্র একবার বহিস্কার করা হয়। একই কী এটিতে সেট করা সর্বশেষ হ্যান্ডলারের সাথে আবদ্ধ হবে।
ব্যবহার | রিটার্নস | ui.root.setKeyHandler(keyCode, handler, description ) | |
যুক্তি | টাইপ | বিস্তারিত | keyCode | তালিকা<ui.Key>|ui.Key | একটি কী কোড বা কী কোডের একটি অ্যারে। উদাহরণস্বরূপ, ui.Key.A বা [ui.Key.SHIFT, ui.Key.A]। |
handler | ফাংশন | কী কমান্ডের জন্য হ্যান্ডলার। |
description | স্ট্রিং, ঐচ্ছিক | একটি সংক্ষিপ্ত বিবরণ যা এই কী কমান্ডকে ব্যাখ্যা করে। বর্ণনাটি শর্টকাট মেনুতে দৃশ্যমান হবে। |
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003e\u003ccode\u003esetKeyHandler\u003c/code\u003e enables assigning custom keyboard shortcuts to the root panel within a Google Workspace Add-on.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts a key code (or array for combinations), a handler function to execute, and an optional description for the UI.\u003c/p\u003e\n"],["\u003cp\u003eOnly the most recently assigned handler for a specific key combination will be active, replacing any previous ones.\u003c/p\u003e\n"],["\u003cp\u003eThese custom shortcuts can be accessed and viewed by users within the add-on's Shortcuts Menu when a description is provided.\u003c/p\u003e\n"]]],["The `setKeyHandler` function binds a key command to a handler function on the root panel. It accepts a key code (or array of codes), a handler function, and an optional description. When the bound key is pressed, the handler is executed once. Only the most recently assigned handler for a specific key will be triggered. Key codes can be individual (e.g., `ui.Key.A`) or combined (e.g., `[ui.Key.SHIFT, ui.Key.A]`). The description is used in the Shortcuts Menu.\n"],null,["# ui.root.setKeyHandler\n\n\u003cbr /\u003e\n\nSets a keydown event handler to the root panel with a non-predefined key. The handler is fired only once when a user presses the bound key command. The same key will be bound to the latest handler set to it.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------------------------------------------|---------|\n| `ui.root.setKeyHandler(keyCode, handler, `*description*`)` | |\n\n| Argument | Type | Details |\n|---------------|------------------------|------------------------------------------------------------------------------------------------------------|\n| `keyCode` | List\\\u003cui.Key\\\u003e\\|ui.Key | A key code or an array of key codes. For example, ui.Key.A or \\[ui.Key.SHIFT, ui.Key.A\\]. |\n| `handler` | Function | The handler for the key command. |\n| `description` | String, optional | A short description that explains this key command. The description will be visible in the Shortcuts Menu. |"]]