@quenty/inputkeymaputils 14.24.0-canary.ae8d76d.0 → 14.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,18 +3,19 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [14.24.0-canary.ae8d76d.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/inputkeymaputils@14.23.3...@quenty/inputkeymaputils@14.24.0-canary.ae8d76d.0) (2025-05-10)
6
+ # [14.24.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/inputkeymaputils@14.23.3...@quenty/inputkeymaputils@14.24.0) (2025-05-10)
7
7
 
8
8
 
9
9
  ### Bug Fixes
10
10
 
11
11
  * Additional type checking updates ([05ba29a](https://github.com/Quenty/NevermoreEngine/commit/05ba29a03efc9f3feed74b34f1d9dfb237496214))
12
+ * Fix recursive require ([6288f3c](https://github.com/Quenty/NevermoreEngine/commit/6288f3cc60e3aa8efe83aa685c6490bc6c01ff84))
12
13
  * slottedtouchbutton recursion ([#557](https://github.com/Quenty/NevermoreEngine/issues/557)) ([c3e5c89](https://github.com/Quenty/NevermoreEngine/commit/c3e5c8977f9207f1b56489010ce12b204a28f4ae))
13
14
 
14
15
 
15
16
  ### Features
16
17
 
17
- * Add even more types ([ae8d76d](https://github.com/Quenty/NevermoreEngine/commit/ae8d76d996594e017ac4bfa19f3c064ebe307cd8))
18
+ * Add even more types ([b31717d](https://github.com/Quenty/NevermoreEngine/commit/b31717d8c9f7620c457f5018a2affa760a65334a))
18
19
 
19
20
 
20
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/inputkeymaputils",
3
- "version": "14.24.0-canary.ae8d76d.0",
3
+ "version": "14.24.0",
4
4
  "description": "System to define rebindable key bindings and inputs for Roblox.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -26,26 +26,26 @@
26
26
  "Quenty"
27
27
  ],
28
28
  "dependencies": {
29
- "@quenty/baseobject": "10.8.3",
30
- "@quenty/brio": "14.18.0-canary.ae8d76d.0",
31
- "@quenty/clienttranslator": "14.20.0-canary.ae8d76d.0",
32
- "@quenty/ducktype": "5.8.4",
33
- "@quenty/enumutils": "3.4.2",
34
- "@quenty/inputmode": "13.19.0-canary.ae8d76d.0",
35
- "@quenty/loader": "10.8.3",
36
- "@quenty/maid": "3.4.3",
37
- "@quenty/observablecollection": "12.21.0-canary.ae8d76d.0",
38
- "@quenty/pseudolocalize": "3.4.2",
39
- "@quenty/rx": "13.18.0-canary.ae8d76d.0",
40
- "@quenty/servicebag": "11.12.0-canary.ae8d76d.0",
41
- "@quenty/statestack": "14.19.0-canary.ae8d76d.0",
42
- "@quenty/string": "3.3.3",
43
- "@quenty/table": "3.7.4",
44
- "@quenty/valuebaseutils": "13.18.0-canary.ae8d76d.0",
45
- "@quenty/valueobject": "13.18.0-canary.ae8d76d.0"
29
+ "@quenty/baseobject": "^10.9.0",
30
+ "@quenty/brio": "^14.18.0",
31
+ "@quenty/clienttranslator": "^14.20.0",
32
+ "@quenty/ducktype": "^5.9.0",
33
+ "@quenty/enumutils": "^3.4.2",
34
+ "@quenty/inputmode": "^13.19.0",
35
+ "@quenty/loader": "^10.9.0",
36
+ "@quenty/maid": "^3.5.0",
37
+ "@quenty/observablecollection": "^12.21.0",
38
+ "@quenty/pseudolocalize": "^3.5.0",
39
+ "@quenty/rx": "^13.18.0",
40
+ "@quenty/servicebag": "^11.12.0",
41
+ "@quenty/statestack": "^14.19.0",
42
+ "@quenty/string": "^3.3.3",
43
+ "@quenty/table": "^3.8.0",
44
+ "@quenty/valuebaseutils": "^13.18.0",
45
+ "@quenty/valueobject": "^13.18.0"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "ae8d76d996594e017ac4bfa19f3c064ebe307cd8"
50
+ "gitHead": "20cff952c2cf06b959f2f11d2293bdef38acc604"
51
51
  }
@@ -47,7 +47,7 @@ function InputKeyMapListUtils.observeActiveInputKeyMap(inputKeyMapList, serviceB
47
47
  else
48
48
  return Rx.of(nil)
49
49
  end
50
- end);
50
+ end),
51
51
  })
52
52
  end
53
53
 
@@ -74,8 +74,8 @@ function InputKeyMapListUtils.observeActiveInputTypesList(inputKeyMapList, servi
74
74
  else
75
75
  return Rx.of(nil)
76
76
  end
77
- end);
78
- Rx.distinct();
77
+ end),
78
+ Rx.distinct(),
79
79
  })
80
80
  end
81
81
 
@@ -104,4 +104,4 @@ function InputKeyMapListUtils.observeActiveInputModeType(inputKeyMapList, servic
104
104
  end)
105
105
  end
106
106
 
107
- return InputKeyMapListUtils
107
+ return InputKeyMapListUtils
@@ -48,9 +48,13 @@ function InputKeyMapServiceClient:_ensureLocalizationEntries()
48
48
  local value = text
49
49
 
50
50
  localizationTable:SetEntryValue(key, source, context, localeId, value)
51
- localizationTable:SetEntryValue(key, source, context,
51
+ localizationTable:SetEntryValue(
52
+ key,
53
+ source,
54
+ context,
52
55
  PseudoLocalize.getDefaultPseudoLocaleId(),
53
- PseudoLocalize.pseudoLocalize(value))
56
+ PseudoLocalize.pseudoLocalize(value)
57
+ )
54
58
  end))
55
59
  end
56
60
 
@@ -58,4 +62,4 @@ function InputKeyMapServiceClient:Destroy()
58
62
  self._maid:DoCleaning()
59
63
  end
60
64
 
61
- return InputKeyMapServiceClient
65
+ return InputKeyMapServiceClient
@@ -18,4 +18,4 @@ function InputKeyMapService:Init(serviceBag: ServiceBag.ServiceBag)
18
18
  self._serviceBag:GetService(require("InputKeyMapTranslator"))
19
19
  end
20
20
 
21
- return InputKeyMapService
21
+ return InputKeyMapService
@@ -11,10 +11,10 @@
11
11
  local require = require(script.Parent.loader).load(script)
12
12
 
13
13
  local BaseObject = require("BaseObject")
14
- local ValueObject = require("ValueObject")
15
14
  local InputModeType = require("InputModeType")
16
15
  local InputTypeUtils = require("InputTypeUtils")
17
16
  local Observable = require("Observable")
17
+ local ValueObject = require("ValueObject")
18
18
 
19
19
  local InputKeyMap = setmetatable({}, BaseObject)
20
20
  InputKeyMap.ClassName = "InputKeyMap"
@@ -126,4 +126,4 @@ function InputKeyMap.GetInputTypesList(self: InputKeyMap): { InputType }
126
126
  return self._inputTypeList.Value
127
127
  end
128
128
 
129
- return InputKeyMap
129
+ return InputKeyMap
@@ -478,35 +478,39 @@ function InputKeyMapList._ensureInit(self: InputKeyMapList)
478
478
  self._isRobloxTouchButton = self._maid:Add(StateStack.new(false, "boolean"))
479
479
 
480
480
  -- Listen
481
- self._maid:GiveTask(self._inputModeTypeToInputKeyMap:ObserveValuesBrio():Subscribe(function(brio: Brio.Brio<InputKeyMap.InputKeyMap>)
482
- if brio:IsDead() then
483
- return
484
- end
485
-
486
- local inputKeyMapMaid = brio:ToMaid()
487
- local inputKeyMap: InputKeyMap.InputKeyMap = brio:GetValue()
488
-
489
- inputKeyMapMaid:GiveTask(inputKeyMap:ObserveInputTypesList():Subscribe(function(inputTypes)
490
- local maid = Maid.new()
491
-
492
- for _, inputType in inputTypes do
493
- -- only emit enum items
494
- if typeof(inputType) == "EnumItem" then
495
- maid:GiveTask(countingMap:Add(inputType :: any))
496
- elseif InputTypeUtils.isTapInWorld(inputType) then
497
- maid:GiveTask(self._isTapInWorld:PushState(true))
498
- elseif InputTypeUtils.isRobloxTouchButton(inputType) then
499
- maid:GiveTask(self._isRobloxTouchButton:PushState(true))
500
- elseif InputChordUtils.isModifierInputChord(inputType) then
501
- maid:GiveTask(countingMap:Add((inputType :: any).keyCode))
481
+ self._maid:GiveTask(
482
+ self._inputModeTypeToInputKeyMap
483
+ :ObserveValuesBrio()
484
+ :Subscribe(function(brio: Brio.Brio<InputKeyMap.InputKeyMap>)
485
+ if brio:IsDead() then
486
+ return
502
487
  end
503
- end
504
488
 
505
- inputKeyMapMaid._current = maid
506
- end))
507
- end))
489
+ local inputKeyMapMaid = brio:ToMaid()
490
+ local inputKeyMap: InputKeyMap.InputKeyMap = brio:GetValue()
491
+
492
+ inputKeyMapMaid:GiveTask(inputKeyMap:ObserveInputTypesList():Subscribe(function(inputTypes)
493
+ local maid = Maid.new()
494
+
495
+ for _, inputType in inputTypes do
496
+ -- only emit enum items
497
+ if typeof(inputType) == "EnumItem" then
498
+ maid:GiveTask(countingMap:Add(inputType :: any))
499
+ elseif InputTypeUtils.isTapInWorld(inputType) then
500
+ maid:GiveTask(self._isTapInWorld:PushState(true))
501
+ elseif InputTypeUtils.isRobloxTouchButton(inputType) then
502
+ maid:GiveTask(self._isRobloxTouchButton:PushState(true))
503
+ elseif InputChordUtils.isModifierInputChord(inputType) then
504
+ maid:GiveTask(countingMap:Add((inputType :: any).keyCode))
505
+ end
506
+ end
507
+
508
+ inputKeyMapMaid._current = maid
509
+ end))
510
+ end)
511
+ )
508
512
 
509
513
  return self._inputTypesForBinding
510
514
  end
511
515
 
512
- return InputKeyMapList
516
+ return InputKeyMapList
@@ -195,4 +195,4 @@ function InputKeyMapListProvider.Destroy(self: InputKeyMapListProvider)
195
195
  self._inputKeyMapLists = {}
196
196
  end
197
197
 
198
- return InputKeyMapListProvider
198
+ return InputKeyMapListProvider
@@ -12,8 +12,8 @@ local require = require(script.Parent.loader).load(script)
12
12
 
13
13
  local Maid = require("Maid")
14
14
  local ObservableList = require("ObservableList")
15
- local RxBrioUtils = require("RxBrioUtils")
16
15
  local Rx = require("Rx")
16
+ local RxBrioUtils = require("RxBrioUtils")
17
17
  local ServiceBag = require("ServiceBag")
18
18
 
19
19
  local InputKeyMapRegistryServiceShared = {}
@@ -135,5 +135,4 @@ function InputKeyMapRegistryServiceShared:Destroy()
135
135
  self._maid:DoCleaning()
136
136
  end
137
137
 
138
-
139
- return InputKeyMapRegistryServiceShared
138
+ return InputKeyMapRegistryServiceShared
@@ -5,4 +5,4 @@
5
5
 
6
6
  local require = require(script.Parent.loader).load(script)
7
7
 
8
- return require("JSONTranslator").new("InputKeyMapTranslator", "en", {})
8
+ return require("JSONTranslator").new("InputKeyMapTranslator", "en", {})
@@ -38,10 +38,10 @@ function InputChordUtils.createModifierInputChord(modifiers, keyCode)
38
38
  assert(EnumUtils.isOfType(Enum.KeyCode, keyCode), "Bad keyCode")
39
39
 
40
40
  return {
41
- type = "ModifierInputChord";
42
- modifiers = modifiers;
43
- keyCode = keyCode;
41
+ type = "ModifierInputChord",
42
+ modifiers = modifiers,
43
+ keyCode = keyCode,
44
44
  }
45
45
  end
46
46
 
47
- return InputChordUtils
47
+ return InputChordUtils
@@ -137,4 +137,4 @@ function InputTypeUtils.areInputTypesListsEquivalent(a: { InputType }, b: { Inpu
137
137
  return #left == 0
138
138
  end
139
139
 
140
- return InputTypeUtils
140
+ return InputTypeUtils
@@ -6,7 +6,6 @@
6
6
  local require = require(script.Parent.loader).load(script)
7
7
 
8
8
  local InputModeType = require("InputModeType")
9
- local InputKeyMapList = require("InputKeyMapList")
10
9
 
11
10
  local SlottedTouchButtonUtils = {}
12
11
 
@@ -83,9 +82,7 @@ end
83
82
  @param inputKeyMapList InputKeyMapList
84
83
  @return { SlottedTouchButtonData }
85
84
  ]=]
86
- function SlottedTouchButtonUtils.getSlottedTouchButtonData(
87
- inputKeyMapList: InputKeyMapList.InputKeyMapList
88
- ): { SlottedTouchButtonData }
85
+ function SlottedTouchButtonUtils.getSlottedTouchButtonData(inputKeyMapList: any): { SlottedTouchButtonData }
89
86
  local slottedTouchButtons: { SlottedTouchButtonData } = {}
90
87
 
91
88
  for _, inputKeyMap: any in inputKeyMapList:GetInputKeyMaps() do
@@ -4,28 +4,28 @@
4
4
  ]=]
5
5
  local require = require(script.Parent.loader).load(script)
6
6
 
7
- local InputModeTypes = require("InputModeTypes")
8
7
  local InputKeyMap = require("InputKeyMap")
9
8
  local InputKeyMapList = require("InputKeyMapList")
10
9
  local InputKeyMapListProvider = require("InputKeyMapListProvider")
10
+ local InputModeTypes = require("InputModeTypes")
11
11
  local SlottedTouchButtonUtils = require("SlottedTouchButtonUtils")
12
12
 
13
13
  return InputKeyMapListProvider.new(script.Name, function(self)
14
14
  self:Add(InputKeyMapList.new("JUMP", {
15
- InputKeyMap.new(InputModeTypes.KeyboardAndMouse, { Enum.KeyCode.Q });
16
- InputKeyMap.new(InputModeTypes.Gamepads, { Enum.KeyCode.ButtonY });
17
- InputKeyMap.new(InputModeTypes.Touch, { SlottedTouchButtonUtils.createSlottedTouchButton("primary3") });
15
+ InputKeyMap.new(InputModeTypes.KeyboardAndMouse, { Enum.KeyCode.Q }),
16
+ InputKeyMap.new(InputModeTypes.Gamepads, { Enum.KeyCode.ButtonY }),
17
+ InputKeyMap.new(InputModeTypes.Touch, { SlottedTouchButtonUtils.createSlottedTouchButton("primary3") }),
18
18
  }, {
19
- bindingName = "Jump";
20
- rebindable = true;
19
+ bindingName = "Jump",
20
+ rebindable = true,
21
21
  }))
22
22
 
23
23
  self:Add(InputKeyMapList.new("HONK", {
24
- InputKeyMap.new(InputModeTypes.KeyboardAndMouse, { Enum.KeyCode.H });
25
- InputKeyMap.new(InputModeTypes.Gamepads, { Enum.KeyCode.ButtonL1 });
26
- InputKeyMap.new(InputModeTypes.Touch, { SlottedTouchButtonUtils.createSlottedTouchButton("primary2") });
24
+ InputKeyMap.new(InputModeTypes.KeyboardAndMouse, { Enum.KeyCode.H }),
25
+ InputKeyMap.new(InputModeTypes.Gamepads, { Enum.KeyCode.ButtonL1 }),
26
+ InputKeyMap.new(InputModeTypes.Touch, { SlottedTouchButtonUtils.createSlottedTouchButton("primary2") }),
27
27
  }, {
28
- bindingName = "Honk";
29
- rebindable = true;
28
+ bindingName = "Honk",
29
+ rebindable = true,
30
30
  }))
31
- end)
31
+ end)
@@ -23,5 +23,4 @@ keyMapList:ObserveInputEnumsList():Subscribe(function(...)
23
23
  end, false, ...)
24
24
  end)
25
25
 
26
-
27
- keyMapList:SetForInputMode(InputModeTypes.Keypad, { Enum.KeyCode.Space })
26
+ keyMapList:SetForInputMode(InputModeTypes.Keypad, { Enum.KeyCode.Space })
@@ -10,4 +10,3 @@ local serviceBag = require("ServiceBag").new()
10
10
  serviceBag:GetService(require("TestInputKeyMap"))
11
11
  serviceBag:Init()
12
12
  serviceBag:Start()
13
-