<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://forge.gemwire.uk/index.php?action=history&amp;feed=atom&amp;title=Key_Mappings</id>
	<title>Key Mappings - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://forge.gemwire.uk/index.php?action=history&amp;feed=atom&amp;title=Key_Mappings"/>
	<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Key_Mappings&amp;action=history"/>
	<updated>2026-05-01T17:39:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://forge.gemwire.uk/index.php?title=Key_Mappings&amp;diff=3291&amp;oldid=prev</id>
		<title>ChampionAsh5357: Update to 1.19</title>
		<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Key_Mappings&amp;diff=3291&amp;oldid=prev"/>
		<updated>2022-06-18T15:03:56Z</updated>

		<summary type="html">&lt;p&gt;Update to 1.19&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:03, 18 June 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot; &gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Using Registered Mappings ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Using Registered Mappings ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There are two contexts in which a key mapping can be used normally: in or not in a screen. As such, there are two ways to handle these mappings. When not in a screen, &amp;lt;code&amp;gt;ClientTickEvent&amp;lt;/code&amp;gt; should be used to determine whether the key is down using &amp;lt;code&amp;gt;KeyMapping#isDown&amp;lt;/code&amp;gt;. If within a screen, the following logic can be applied using &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;KeyMapping&lt;/del&gt;#isActiveAndMatches&amp;lt;/code&amp;gt; within &amp;lt;code&amp;gt;GuiEventListener#keyPressed&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GuiEventListener#mouseClicked&amp;lt;/code&amp;gt; for mouse input. Note that the necessary &amp;lt;code&amp;gt;InputConstants$Key&amp;lt;/code&amp;gt; can be constructed using &amp;lt;code&amp;gt;InputConstants::getKey&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InputConstants$Type::getOrCreate&amp;lt;/code&amp;gt; respectively.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There are two contexts in which a key mapping can be used normally: in or not in a screen. As such, there are two ways to handle these mappings. When not in a screen, &amp;lt;code&amp;gt;ClientTickEvent&amp;lt;/code&amp;gt; should be used to determine whether the key is down using &amp;lt;code&amp;gt;KeyMapping#isDown&amp;lt;/code&amp;gt;. If within a screen, the following logic can be applied using &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;IForgeKeyMapping&lt;/ins&gt;#isActiveAndMatches&amp;lt;/code&amp;gt; within &amp;lt;code&amp;gt;GuiEventListener#keyPressed&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GuiEventListener#mouseClicked&amp;lt;/code&amp;gt; for mouse input. Note that the necessary &amp;lt;code&amp;gt;InputConstants$Key&amp;lt;/code&amp;gt; can be constructed using &amp;lt;code&amp;gt;InputConstants::getKey&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InputConstants$Type::getOrCreate&amp;lt;/code&amp;gt; respectively.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>ChampionAsh5357</name></author>
	</entry>
	<entry>
		<id>https://forge.gemwire.uk/index.php?title=Key_Mappings&amp;diff=2934&amp;oldid=prev</id>
		<title>SciWhiz12: reword lead section</title>
		<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Key_Mappings&amp;diff=2934&amp;oldid=prev"/>
		<updated>2021-08-29T13:35:34Z</updated>

		<summary type="html">&lt;p&gt;reword lead section&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:35, 29 August 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;An input &lt;/del&gt;is &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;required to produce some sort &lt;/del&gt;of action to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the player within the game. These inputs can be boiled down to mappings associated with &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;certain key or &lt;/del&gt;mouse click. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;To allow &lt;/del&gt;these &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;inputs to be remappable, a &lt;/del&gt;&amp;lt;code&amp;gt;KeyMapping&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;can be declared and registered.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;A '''key mapping''' or '''keybinding''' &lt;/ins&gt;is &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the relation &lt;/ins&gt;of &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;an &lt;/ins&gt;action to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;an input, such as &lt;/ins&gt;a mouse click &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;or a combination of key presses&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;The action for the keymapping is defined in the code, while the triggering input is configurable by the user through the [[:mc:Options#Controls|Controls menu]]. In the code, &lt;/ins&gt;these &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;key mappings are declared and represented by &lt;/ins&gt;&amp;lt;code&amp;gt;KeyMapping&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;instances&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A &amp;lt;code&amp;gt;KeyMapping&amp;lt;/code&amp;gt; can be declared with the following parameters:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A &amp;lt;code&amp;gt;KeyMapping&amp;lt;/code&amp;gt; can be declared with the following parameters:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>SciWhiz12</name></author>
	</entry>
	<entry>
		<id>https://forge.gemwire.uk/index.php?title=Key_Mappings&amp;diff=2898&amp;oldid=prev</id>
		<title>ChampionAsh5357: Update to 1.17</title>
		<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Key_Mappings&amp;diff=2898&amp;oldid=prev"/>
		<updated>2021-08-02T22:29:35Z</updated>

		<summary type="html">&lt;p&gt;Update to 1.17&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:29, 2 August 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;An input is required to produce some sort of action to the player within the game. These inputs can be boiled down to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;bindings &lt;/del&gt;associated with a certain key or mouse click. To allow these inputs to be remappable, a &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;KeyBinding&lt;/del&gt;&amp;lt;/code&amp;gt; can be declared and registered.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;An input is required to produce some sort of action to the player within the game. These inputs can be boiled down to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mappings &lt;/ins&gt;associated with a certain key or mouse click. To allow these inputs to be remappable, a &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;KeyMapping&lt;/ins&gt;&amp;lt;/code&amp;gt; can be declared and registered.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;KeyBinding&lt;/del&gt;&amp;lt;/code&amp;gt; can be declared with the following parameters:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;KeyMapping&lt;/ins&gt;&amp;lt;/code&amp;gt; can be declared with the following parameters:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! Parameter !! Description&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! Parameter !! Description&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;description &lt;/del&gt;|| A translation key used to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;describe what &lt;/del&gt;this &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;binding will do &lt;/del&gt;(e.g. &amp;lt;code&amp;gt;key.modid.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;keyName&lt;/del&gt;&amp;lt;/code&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;name &lt;/ins&gt;|| A translation key used to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;set the name of &lt;/ins&gt;this &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;key mapping &lt;/ins&gt;(e.g. &amp;lt;code&amp;gt;key.modid.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;key_name&lt;/ins&gt;&amp;lt;/code&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| keyConflictContext || Determines when the key &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;binding &lt;/del&gt;should conflict with another defined key &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;binding&lt;/del&gt;. By default, there are three values within &amp;lt;code&amp;gt;KeyConflictContext&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;UNIVERSAL&amp;lt;/code&amp;gt; which are used in every context, &amp;lt;code&amp;gt;GUI&amp;lt;/code&amp;gt; which are used whenever a screen is open, and &amp;lt;code&amp;gt;IN_GAME&amp;lt;/code&amp;gt; whenever a screen is not open. Custom contexts can be created by implementing &amp;lt;code&amp;gt;IKeyConflictContext&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| keyConflictContext || Determines when the key &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mapping &lt;/ins&gt;should conflict with another defined key &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mapping&lt;/ins&gt;. By default, there are three values within &amp;lt;code&amp;gt;KeyConflictContext&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;UNIVERSAL&amp;lt;/code&amp;gt; which are used in every context, &amp;lt;code&amp;gt;GUI&amp;lt;/code&amp;gt; which are used whenever a screen is open, and &amp;lt;code&amp;gt;IN_GAME&amp;lt;/code&amp;gt; whenever a screen is not open. Custom contexts can be created by implementing &amp;lt;code&amp;gt;IKeyConflictContext&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;inputType &lt;/del&gt;|| Determines the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;type of &lt;/del&gt;input this &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;binding &lt;/del&gt;will declare by default. There are three possible values: &amp;lt;code&amp;gt;KEYSYM&amp;lt;/code&amp;gt; which represents a mapped key, &amp;lt;code&amp;gt;SCANCODE&amp;lt;/code&amp;gt; which represents the value emitted by the keyboard itself, and &amp;lt;code&amp;gt;MOUSE&amp;lt;/code&amp;gt; which represents a mouse click.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;key &lt;/ins&gt;|| Determines the input &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;context &lt;/ins&gt;this &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mapping &lt;/ins&gt;will declare by default&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. This is a combination of the input type, input code, and any additional modifiers&lt;/ins&gt;. There are three possible values &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;for the input type&lt;/ins&gt;: &amp;lt;code&amp;gt;KEYSYM&amp;lt;/code&amp;gt; which represents a mapped key, &amp;lt;code&amp;gt;SCANCODE&amp;lt;/code&amp;gt; which represents the value emitted by the keyboard itself, and &amp;lt;code&amp;gt;MOUSE&amp;lt;/code&amp;gt; which represents a mouse click&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. The associated input codes and modifiers are based on the specified input type as mapped by &amp;lt;code&amp;gt;GLFW&amp;lt;/code&amp;gt;&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;| keyCode || The associated key codes based on the specified input type as mapped by &amp;lt;code&amp;gt;GLFW&amp;lt;/code&amp;gt;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| category || A translation key representing the category this key is located in (e.g. &amp;lt;code&amp;gt;key.modid.categories.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;category_name&lt;/ins&gt;&amp;lt;/code&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;|-&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| category || A translation key representing the category this key is located in (e.g. &amp;lt;code&amp;gt;key.modid.categories.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;categoryName&lt;/del&gt;&amp;lt;/code&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Tip|If you would like there to be no &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;binding &lt;/del&gt;by default, use a constructor that contains &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;InputMappings&lt;/del&gt;$&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Input&lt;/del&gt;&amp;lt;/code&amp;gt; instead and supply &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;InputMappings&lt;/del&gt;#&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;INPUT_INVALID&lt;/del&gt;&amp;lt;/code&amp;gt; as the argument.}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Tip|If you would like there to be no &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mapping &lt;/ins&gt;by default, use a constructor that contains &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;InputConstants&lt;/ins&gt;$&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Key&lt;/ins&gt;&amp;lt;/code&amp;gt; instead and supply &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;InputConstants&lt;/ins&gt;#&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;UNKNOWN&lt;/ins&gt;&amp;lt;/code&amp;gt; as the argument.}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;KeyBinding&lt;/del&gt;&amp;lt;/code&amp;gt; can then be registered using &amp;lt;code&amp;gt;ClientRegistry::registerKeyBinding&amp;lt;/code&amp;gt; within &amp;lt;code&amp;gt;FMLClientSetupEvent&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;KeyMapping&lt;/ins&gt;&amp;lt;/code&amp;gt; can then be registered using &amp;lt;code&amp;gt;ClientRegistry::registerKeyBinding&amp;lt;/code&amp;gt; within &amp;lt;code&amp;gt;FMLClientSetupEvent&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Using Registered &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Bindings &lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Using Registered &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Mappings &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There are two contexts in which a key &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;binding &lt;/del&gt;can be used normally: in or not in a screen. As such, there are two ways to handle these &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;bindings&lt;/del&gt;. When not in a screen, &amp;lt;code&amp;gt;ClientTickEvent&amp;lt;/code&amp;gt; should be used to determine whether the key is down using &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;KeyBinding&lt;/del&gt;#&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;isKeyDown&lt;/del&gt;&amp;lt;/code&amp;gt;. If within a screen, the following logic can be applied using &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;KeyBinding&lt;/del&gt;#isActiveAndMatches&amp;lt;/code&amp;gt; within &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;IGuiEventListener&lt;/del&gt;#keyPressed&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;IGuiEventListener&lt;/del&gt;#mouseClicked&amp;lt;/code&amp;gt; for mouse input. Note that the necessary &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;InputMappings&lt;/del&gt;$&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Input&lt;/del&gt;&amp;lt;/code&amp;gt; can be constructed using &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;InputMappings&lt;/del&gt;::&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;getInputByCode&lt;/del&gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;MOUSE&lt;/del&gt;::&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;getOrMakeInput&lt;/del&gt;&amp;lt;/code&amp;gt; respectively.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There are two contexts in which a key &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mapping &lt;/ins&gt;can be used normally: in or not in a screen. As such, there are two ways to handle these &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mappings&lt;/ins&gt;. When not in a screen, &amp;lt;code&amp;gt;ClientTickEvent&amp;lt;/code&amp;gt; should be used to determine whether the key is down using &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;KeyMapping&lt;/ins&gt;#&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;isDown&lt;/ins&gt;&amp;lt;/code&amp;gt;. If within a screen, the following logic can be applied using &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;KeyMapping&lt;/ins&gt;#isActiveAndMatches&amp;lt;/code&amp;gt; within &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;GuiEventListener&lt;/ins&gt;#keyPressed&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;GuiEventListener&lt;/ins&gt;#mouseClicked&amp;lt;/code&amp;gt; for mouse input. Note that the necessary &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;InputConstants&lt;/ins&gt;$&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Key&lt;/ins&gt;&amp;lt;/code&amp;gt; can be constructed using &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;InputConstants&lt;/ins&gt;::&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;getKey&lt;/ins&gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;InputConstants$Type&lt;/ins&gt;::&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;getOrCreate&lt;/ins&gt;&amp;lt;/code&amp;gt; respectively.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>ChampionAsh5357</name></author>
	</entry>
	<entry>
		<id>https://forge.gemwire.uk/index.php?title=Key_Mappings&amp;diff=2895&amp;oldid=prev</id>
		<title>ChampionAsh5357: ChampionAsh5357 moved page Key Bindings to Key Mappings: Class rename</title>
		<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Key_Mappings&amp;diff=2895&amp;oldid=prev"/>
		<updated>2021-08-02T22:16:46Z</updated>

		<summary type="html">&lt;p&gt;ChampionAsh5357 moved page &lt;a href=&quot;/wiki/Key_Bindings&quot; class=&quot;mw-redirect&quot; title=&quot;Key Bindings&quot;&gt;Key Mappings&lt;/a&gt; to &lt;a href=&quot;/wiki/Key_Mappings&quot; title=&quot;Key Mappings&quot;&gt;Key Mappings&lt;/a&gt;: Class rename&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:16, 2 August 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>ChampionAsh5357</name></author>
	</entry>
	<entry>
		<id>https://forge.gemwire.uk/index.php?title=Key_Mappings&amp;diff=2319&amp;oldid=prev</id>
		<title>ChampionAsh5357: Key Bindings docs, should be applied within some subcategory</title>
		<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Key_Mappings&amp;diff=2319&amp;oldid=prev"/>
		<updated>2021-01-04T01:26:57Z</updated>

		<summary type="html">&lt;p&gt;Key Bindings docs, should be applied within some subcategory&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;An input is required to produce some sort of action to the player within the game. These inputs can be boiled down to bindings associated with a certain key or mouse click. To allow these inputs to be remappable, a &amp;lt;code&amp;gt;KeyBinding&amp;lt;/code&amp;gt; can be declared and registered.&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code&amp;gt;KeyBinding&amp;lt;/code&amp;gt; can be declared with the following parameters:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Description&lt;br /&gt;
|-&lt;br /&gt;
| description || A translation key used to describe what this binding will do (e.g. &amp;lt;code&amp;gt;key.modid.keyName&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| keyConflictContext || Determines when the key binding should conflict with another defined key binding. By default, there are three values within &amp;lt;code&amp;gt;KeyConflictContext&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;UNIVERSAL&amp;lt;/code&amp;gt; which are used in every context, &amp;lt;code&amp;gt;GUI&amp;lt;/code&amp;gt; which are used whenever a screen is open, and &amp;lt;code&amp;gt;IN_GAME&amp;lt;/code&amp;gt; whenever a screen is not open. Custom contexts can be created by implementing &amp;lt;code&amp;gt;IKeyConflictContext&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| inputType || Determines the type of input this binding will declare by default. There are three possible values: &amp;lt;code&amp;gt;KEYSYM&amp;lt;/code&amp;gt; which represents a mapped key, &amp;lt;code&amp;gt;SCANCODE&amp;lt;/code&amp;gt; which represents the value emitted by the keyboard itself, and &amp;lt;code&amp;gt;MOUSE&amp;lt;/code&amp;gt; which represents a mouse click.&lt;br /&gt;
|-&lt;br /&gt;
| keyCode || The associated key codes based on the specified input type as mapped by &amp;lt;code&amp;gt;GLFW&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| category || A translation key representing the category this key is located in (e.g. &amp;lt;code&amp;gt;key.modid.categories.categoryName&amp;lt;/code&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
{{Tip|If you would like there to be no binding by default, use a constructor that contains &amp;lt;code&amp;gt;InputMappings$Input&amp;lt;/code&amp;gt; instead and supply &amp;lt;code&amp;gt;InputMappings#INPUT_INVALID&amp;lt;/code&amp;gt; as the argument.}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;KeyBinding&amp;lt;/code&amp;gt; can then be registered using &amp;lt;code&amp;gt;ClientRegistry::registerKeyBinding&amp;lt;/code&amp;gt; within &amp;lt;code&amp;gt;FMLClientSetupEvent&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Using Registered Bindings ==&lt;br /&gt;
&lt;br /&gt;
There are two contexts in which a key binding can be used normally: in or not in a screen. As such, there are two ways to handle these bindings. When not in a screen, &amp;lt;code&amp;gt;ClientTickEvent&amp;lt;/code&amp;gt; should be used to determine whether the key is down using &amp;lt;code&amp;gt;KeyBinding#isKeyDown&amp;lt;/code&amp;gt;. If within a screen, the following logic can be applied using &amp;lt;code&amp;gt;KeyBinding#isActiveAndMatches&amp;lt;/code&amp;gt; within &amp;lt;code&amp;gt;IGuiEventListener#keyPressed&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;IGuiEventListener#mouseClicked&amp;lt;/code&amp;gt; for mouse input. Note that the necessary &amp;lt;code&amp;gt;InputMappings$Input&amp;lt;/code&amp;gt; can be constructed using &amp;lt;code&amp;gt;InputMappings::getInputByCode&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MOUSE::getOrMakeInput&amp;lt;/code&amp;gt; respectively.&lt;/div&gt;</summary>
		<author><name>ChampionAsh5357</name></author>
	</entry>
</feed>