संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
blockly > ShortcutRegistry > register
ShortcutRegistry.register() तरीका
कीबोर्ड शॉर्टकट रजिस्टर करता है.
हस्ताक्षर:
register(shortcut: KeyboardShortcut, allowOverrides?: boolean): void;
पैरामीटर
पैरामीटर |
टाइप |
ब्यौरा |
शॉर्टकट |
KeyboardShortcut |
इस की कोड का शॉर्टकट. |
allowOverrides |
बूलियन |
(ज़रूरी नहीं) पहले से रजिस्टर किए गए आइटम को बदलने पर चेतावनी न दिखे, इसके लिए True चुनें. |
लौटाए जाने वाले प्रॉडक्ट:
अमान्य
अपवाद
{Error} अगर इस नाम का शॉर्टकट पहले से मौजूद है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","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-25 (UTC) को अपडेट किया गया."],[],["The `register` method within `ShortcutRegistry` registers keyboard shortcuts. It accepts a `KeyboardShortcut` object, representing the shortcut, and an optional boolean, `opt_allowOverrides`. If `opt_allowOverrides` is true, it prevents warnings when overriding existing shortcuts. The method returns nothing (void). An error is thrown if a shortcut with the same name is already registered and the `opt_allowOverrides` is not set to true.\n"]]