Customizable KeyBinds. Better UIS or Advanced CAS

Customizable Keybinds

is a module script that simplifies binding Keys for you.

It can be used in a lot of projects because how simple it is.
When comparing to FastCast or anything like that this module looks like just little feature, however even this feature can save you a lot of time.

It’s as name says fully customizable and if you want to delete this module from your project it will not take any time, but I do not recommend because module is adaptable, have or can have every feature you want.

(Story)
Currently I’m working on huge project by myself and I wanted to use CAS(ContextActionService) but it was too limited. In other hand UIS(UserInputService) wasn’t that limited but was more expensive(I think) and many code to write. To make it tidier I made module script. It’s really small but I will implement new things as I work more.

ModuleScript:
--Version: 1.8
--From: https://devforum.roblox.com/t/customizable-keybinds-better-uis-or-advanced-cas/2910676
--Save the link above to not to miss any updates
local UIS = game:GetService("UserInputService")
local KeyHandler = {
	Keys = {},
	DoubleKeys = {},
	ComboKeys = {}
}
local ConnectionStarted = false

local KeyHoldTime = {}

local ComboHoldTime = {}

local ActiveDoubleKeys = {}

local KeysForCombos = {}

local beganconnection
local endedconnection

function KeyHandler:Start()
	if ConnectionStarted == false then
		ConnectionStarted = true
		beganconnection = UIS.InputBegan:Connect(function(input, gPE)
			local Key = input.KeyCode.Name
			--if gPE then return end
			
			if KeysForCombos[Key] then
				local index = KeysForCombos[Key].Parent
				local ComboKey = self.ComboKeys[index]
				
				local FoundKey = table.find(ComboKey["Keys"], Key)

				if ComboKey["Ordered"] == true then
					FoundKey = 1
				end

				if ComboKey["Keys"][FoundKey] == Key then

					KeysForCombos[Key].Active = true

					if ComboKey["Complete"] == false then
						ComboKey["Funcs"][Key]("began")
						KeyHoldTime[Key] = tick()
					end
					----------
					if KeyHandler.CheckActiveKeysForComboKey(ComboKey["Keys"]) == 0 then
						ComboKey["Func"]("began")
						ComboHoldTime[index] = tick()
					end
				end
				if ComboKey["Priority"] == false then
					
					if ActiveDoubleKeys[Key] then
						--print(Key)
						self.DoubleKeys[Key]("began")
						KeyHoldTime[Key] = tick()
					elseif self.Keys[Key] then
						--print(Key)
						self.Keys[Key]("began")
						KeyHoldTime[Key] = tick()
					end
					
				end
				
			elseif ActiveDoubleKeys[Key] then
				--print(Key)
				self.DoubleKeys[Key]("began")
				KeyHoldTime[Key] = tick()
			elseif self.Keys[Key] then
				--print(Key)
				self.Keys[Key]("began")
				KeyHoldTime[Key] = tick()
			end
		end)
		endedconnection = UIS.InputEnded:Connect(function(input, gPE)
			local Key = input.KeyCode.Name
			--if gPE then return end
			if KeysForCombos[Key] then
				if KeysForCombos[Key].Active == true then
					local index = KeysForCombos[Key].Parent
					local ComboKey = self.ComboKeys[index]

					if ComboKey["Complete"] == false then
						if ComboKey["ResetFuncs"] == true and KeyHandler.CheckActiveKeysForComboKey(ComboKey["Keys"]) == 0 then
							for i, key in pairs(ComboKey["Keys"]) do
								KeysForCombos[key].Active = false
							end
							ComboHoldTime[index] = tick() - ComboHoldTime[index]

							ComboKey["Func"]("ended", ComboHoldTime[index])
						else
							KeyHoldTime[Key] = tick() - KeyHoldTime[Key]

							ComboKey["Funcs"][Key]("ended", KeyHoldTime[Key])
						end
					end
					KeysForCombos[Key].Active = false
					if ComboKey["Priority"] == false then
						if ActiveDoubleKeys[Key] then
							--print(Key)

							KeyHoldTime[Key] = tick() - KeyHoldTime[Key]

							self.DoubleKeys[Key]("ended", KeyHoldTime[Key])
						elseif self.Keys[Key] then
							--print(Key)

							KeyHoldTime[Key] = tick() - KeyHoldTime[Key]

							self.Keys[Key]("ended", KeyHoldTime[Key])
						end
					end
				end
			elseif ActiveDoubleKeys[Key] then
				--print(Key)

				KeyHoldTime[Key] = tick() - KeyHoldTime[Key]

				self.DoubleKeys[Key]("ended", KeyHoldTime[Key])
			elseif self.Keys[Key] then
				--print(Key)

				KeyHoldTime[Key] = tick() - KeyHoldTime[Key]

				self.Keys[Key]("ended", KeyHoldTime[Key])
			end
			if self.DoubleKeys[Key] then
				ActiveDoubleKeys[Key] = self.DoubleKeys[Key]
				task.delay(.2, function()
					ActiveDoubleKeys[Key] = nil
				end) 
			end
		end)
	else
		warn("KeyHandler is already started")
	end
end

function KeyHandler:UpdateComboKeys()
	if #self.ComboKeys > 0 then
		for name, values in pairs(self.ComboKeys) do
			for i, key in ipairs(values["Keys"]) do
				KeysForCombos[key] = {
					Active = false,
					Parent = name
				}
			end
		end
	else
		warn("Not any ComboKeys")
	end
end

function KeyHandler.CheckActiveKeysForComboKey(keytable)
	local ActiveKeys = 0
	for name, key in pairs(keytable) do
		--print(name, key)
		if KeysForCombos[key].Active == false then
			ActiveKeys += 1
		end
	end
	return ActiveKeys
end


function KeyHandler:GetDataFromComboKey(i, parameter)
	return self.ComboKeys[i][parameter]
end
function KeyHandler:SetDataFromComboKey(i, parameter, value)
	self.ComboKeys[i][parameter] = value
end


function KeyHandler.GetHoldTime(Key)
	return KeyHoldTime[Key]
end

function KeyHandler.HoldTimeReset()
	table.clear(KeyHoldTime)
end

function KeyHandler.IsKeyDown(Key)
	return UIS:IsKeyDown(Enum.KeyCode[Key])
end

function KeyHandler:Reset(keytable)
	if keytable ~= nil then
		table.clear(self[keytable])
	else
		table.clear(self.Keys)
		table.clear(self.DoubleKeys)
	end
end

function KeyHandler:SpecifiedReset(keys, keytable)
	if keytable == nil then
		for i,key in ipairs(keys) do
			self.Keys[key] = nil
			self.DoubleKeys[key]= nil
		end
	else
		for i,key in ipairs(keys) do
			self[keytable][key] = nil
		end
	end
end

function KeyHandler:UniqueReset(...)
	local keys = {...}
	if #keys == 0 then 
		table.clear(self.Keys)
		table.clear(self.DoubleKeys)
	else
		local tables = {"Keys", "DoubleKeys"}
		local keytable, keytable2 = keys[1], keys[#keys]

		local actualtable = table.find(tables, keytable) or table.find(tables, keytable2)

		if actualtable ~= nil then
			if #keys == 1 then
				table.clear(self[actualtable])
			else
				for i,key in ipairs(keys) do
					self[actualtable][key] = nil
				end
			end
		else
			for i,key in ipairs(keys) do
				self.Keys[key] = nil
				self.DoubleKeys[key]= nil
			end
		end
	end
end

function KeyHandler:Stop()
	if ConnectionStarted == true then
		ConnectionStarted = false
		beganconnection:Disconnect()
		endedconnection:Disconnect()
	else
		warn("KeyHandler is not active")
	end
end

return KeyHandler

Tutorial
Keys and DoubleKeys
KeyHandler.Keys["LeftShift"] = function(state, holdtime) -- *
   if state == "began" then
      --code
   else --or elseif state == "ended" then
      --code
   end
end
	
KeyHandler.DoubleKeys["LeftShift"] = function(state, holdtime)
	--code
end
-- * = shorter will be "ht"
-- If state is "began" it returns nil but
-- If state is "ended" it returns how much time did player hold this key
ComboKeys Tutorial with Gojo example
KeyHandler.ComboKeys[1] = {
	Keys = {"Q", "E"},
	Ordered = false, --will player need to press buttons in order or not
	Complete = false, --if true, will fire only when all buttons pressed. if false, every key can have their own function
	Priority = true, -- if true then keys used there can not trigger "Keys" and "DoubleKeys"
	ResetFuncs = true --feature from 1.7 version. Variable is optional because default is set to true
	--ResetFuncs example and usefulness will be shown below

	Funcs = {--because "Complete = false" these buttons can be used
		Q = function(state, ht)
			if state == "began" then
				print("Create Blue Particles")
			else
				print("Cursed Technique Lapse: Blue")
			end
		end,
		E = function(state, ht)
			if state == "began" then
				print("Create Red Particles")
			else
				print("Cursed Technique Reversal: Red")
			end
		end
	},
	Func = function(state, ht) --Activates when all keys. 1.8 now it has states and holdtime
		print("Hollow Technique: Purple")
	end
}
KeyHandler:UpdateComboKeys()

--ResetFuncs usefulness: (doesn't work if Complete = true)
--if true then key funcs in this combokey will work as usual but if you activate main function for combokey
--if false the key funcs can trigger InputEnded even if main function is called

--For example: console log for ComboKey[1] from this tutorial if ResetFuncs is true
-- Create Blue Particles  -  Client - Gojo:32
-- Create Red Particles  -  Client - Gojo:39
-- Hollow Technique: Purple  -  Client - Gojo:46

--If ResetFuncs is false
-- Create Blue Particles  -  Client - Gojo:32
-- Create Red Particles  -  Client - Gojo:39
-- Hollow Technique: Purple  -  Client - Gojo:46
-- Cursed Technique Lapse: Blue  -  Client - Gojo:34
-- Cursed Technique Reversal: Red  -  Client - Gojo:41

-- If ResetFuncs is false: when combining Blue and Red
-- player will use 3 abilities which is not what I need
-- So I set ResetFuncs is true. Now when player combines Blue and Red
-- only Purple will be used

-- As you can see ResetFuncs are useful. 

--More usage methods

KeyHandler.ComboKeys[2] = {
	Keys = {"LeftShift", "Space"},
	Ordered = true,
	Complete = false,
	Priority = false,
	Funcs = {
		LeftShift = function()
			KeyHandler.ComboKeys[2].Priority = true
			print("Ready to jump")
		end,
		Space = function()
			KeyHandler.ComboKeys[2].Priority = false
			print("Jump")
		end
	},
	Func = function()
		print("Enchanced super jump")
	end
}
--Use this as you wish only limits of this is your creativity

Example

Localscript in StarterPlayer>StarterCharacterScripts

task.wait(1)
local KeyHandler = require(game.ReplicatedStorage.Modules.KeyHandler)

local char = script.Parent
local hum = char.Humanoid

local MaxSpeed = 50

local States = {
	Default = function()
		hum.WalkSpeed = 10
		hum.JumpPower = 40
		
		KeyHandler.Keys["LeftShift"] = function(state)
			local states = {
				began = function()
					hum.WalkSpeed -= 5
					hum.JumpPower += 20
					char:SetAttribute("MiniState", "Charging")
					print("Start Charging")
				end,
				ended = function()
					hum.WalkSpeed += 5
					hum.JumpPower -= 20
					char:SetAttribute("MiniState", nil)
					print("Stop Charging")
				end,
			}
			states[state]()
		end
		
		KeyHandler.DoubleKeys["LeftShift"] = function(state)
			print(state)
			if state == "ended" then
				char:SetAttribute("State", "Running")
			end
		end
	end,
	Running = function()
		hum.WalkSpeed = 20
		hum.JumpPower = 50
		
		local finished = false --
		KeyHandler.Keys["LeftShift"] = function(state)
			local states = {
				began = function()
					finished = false
					print("Start Acceleration")
					while finished == false do
						task.wait(.2)
						if hum.WalkSpeed < MaxSpeed then
							hum.WalkSpeed += 3
						end
						print("Working")
					end
				end,
				ended = function()
					print("Stop Acceleration")
					finished = true
				end,
			}
			states[state]()
		end

		local finished2 = false
		KeyHandler.Keys["LeftControl"] = function(state)
			local states = {
				began = function()
					finished2 = false
					print("Start Slowing Down")
					while finished2 == false do
						task.wait(.1)
						if hum.WalkSpeed > 21 then
							hum.WalkSpeed -= 6
						end
					end
				end,
				ended = function()
					print("Stop Slowing Down")
					finished2 = true
				end,
			}
			states[state]()
		end

		KeyHandler.DoubleKeys["LeftShift"] = function(state)
			print(state)
			if state == "ended" then
				char:SetAttribute("State", "Default")
			end
		end
	end,
}

char.AttributeChanged:Connect(function(attr)
	if attr == "State" then
		States[char:GetAttribute("State")]()
		print("==",char:GetAttribute("State"), "==")
	end
end)

char:SetAttribute("State", "Default")
KeyHandler:Start()

Controls for States:
Default:

  • Shift = MiniState “Charge” *
  • DoubleShift = State “Running”

Running:

  • Shift = MiniState “Acceleration” *
  • Ctrl = MiniState “Slowing down” *
  • DoubleShift = State “Default”

Don’t call KeyHandler:Start() twice. Just rewrite functions or Reset() them.

Other functions:

Reset
function KeyHandler:Reset(keytable)
	if keytable ~= nil then
		table.clear(self[keytable])
	else
		table.clear(self.Keys)
		table.clear(self.DoubleKeys)
	end
end

Usage:

KeyHandler:Reset() --Resets all keys

KeyHandler:Reset("Keys") --Resets Keys
KeyHandler:Reset("DoubleKeys") --Resets DoubleKeys
SpecifiedReset
function KeyHandler:SpecifiedReset(keys, keytable)
	if keytable == nil then
		for i,key in ipairs(keys) do
			self.Keys[key] = nil
			self.DoubleKeys[key]= nil
		end
	else
		for i,key in ipairs(keys) do
			self[keytable][key] = nil
		end
	end
end

Usage:

KeyHandler:SpecifiedReset({"Q", "R", "LeftShift"}) --Resets these keys in both(Keys and DoubleKeys)

KeyHandler:SpecifiedReset({"Q", "R", "LeftShift"}, "Keys") --Resets these keys in Keys
KeyHandler:SpecifiedReset({"Q", "R", "LeftShift"}, "DoubleKeys") --Resets these keys in DoubleKeys
Unique function: Reset

This function is not in the main module but you can copy it from here and add it to module or use this instead of Reset and SpecifiedReset from the main module because this module can be used for both. It can be slightly slower but difference will be less than 0.01(not tested)

function KeyHandler:UniqueReset(...)
	local keys = {...}
	if #keys == 0 then 
		table.clear(self.Keys)
		table.clear(self.DoubleKeys)
	else
		local tables = {"Keys", "DoubleKeys"}
		local keytable, keytable2 = keys[1], keys[#keys]

		local actualtable = table.find(tables, keytable) or table.find(tables, keytable2)

		if actualtable ~= nil then
			if #keys == 1 then
				table.clear(self[actualtable])
			else
				for i,key in ipairs(keys) do
					self[actualtable][key] = nil
				end
			end
		else
			for i,key in ipairs(keys) do
				self.Keys[key] = nil
				self.DoubleKeys[key]= nil
			end
		end
	end
end

Usage:

KeyHandler:UniqueReset() --Resets all keys

KeyHandler:UniqueReset("Keys") --Resets Keys
KeyHandler:UniqueReset("DoubleKeys") --Resets DoubleKeys


KeyHandler:UniqueReset("Q", "R", "LeftShift") --Resets these keys in both(Keys and DoubleKeys)

KeyHandler:UniqueReset("Keys", "Q", "R", "LeftShift") --Resets these keys in Keys
KeyHandler:UniqueReset("DoubleKeys", "Q", "R", "LeftShift") --Resets these keys in DoubleKeys

KeyHandler:UniqueReset("Q", "R", "LeftShift", "Keys") --Resets these keys in Keys
KeyHandler:UniqueReset("Q", "R", "LeftShift", "DoubleKeys") --Resets these keys in DoubleKeys

UpdateComboKeys

Without it your ComboFunctions won’t work

function KeyHandler:UpdateComboKeys()
	if #self.ComboKeys > 0 then
		for name, values in pairs(self.ComboKeys) do
			for i, key in ipairs(values["Keys"]) do
				KeysForCombos[key] = {
					Active = false,
					Parent = name
				}
			end
		end
	else
		warn("Not any ComboKeys")
	end
end

Usage:

KeyHandler:UpdateComboKeys()

MiniFunctions:

Really small functions. Use “.” not “:”
For example:
Use KeyHandler.GetHoldTime(Key)
Not KeyHandler:GetHoldTime(Key)

GetHoldTime
function KeyHandler.GetHoldTime(Key)
	return KeyHoldTime[Key]
end

Usage:

KeyHandler.GetHoldTime("F") --returns how much time player hold this key
HoldTimeReset
function KeyHandler.HoldTimeReset()
	table.clear(KeyHoldTime)
end

Usage:

KeyHandler.HoldTimeReset() --resets all saved holdtimes
IsKeyDown
function KeyHandler.IsKeyDown(Key)
	return UIS:IsKeyDown(Enum.KeyCode[Key])
end

Usage:

KeyHandler.IsKeyDown("Space") --returns true if player hold this key and false if not
Get and Set DataFromComboKey

Also, take a look at alternatives in “Usage” below

function KeyHandler:GetDataFromComboKey(i, parameter)
	return self.ComboKeys[i][parameter]
end
function KeyHandler:SetDataFromComboKey(i, parameter, value)
	self.ComboKeys[i][parameter] = value
end

Usage:

KeyHandler.GetDataFromComboKey(1, "Complete") 
-- Alternative: KeyHandler.ComboKeys[1].Complete
KeyHandler.SetDataFromComboKey(1, "Complete", true)
-- Alternative: KeyHandler.ComboKeys[1].Complete = true

Latest Version 1.8

Logs:

  • 1.8 Changed ComboKeys. Now you can get state and holdtime even for combo keys

  • 1.7 Added new variable ResetFuncs for ComboKeys and 3 mini functions.
    (Fun fact: ComboKeys were made without using IsKeyDown()

  • 1.6 Added ComboKeys. Learn more in tutorial.
    Also, the warnings in code was added so you will make less mistakes

  • 1.5 Added HoldTime. +3 functions, +1 unique functions.
    StateChanger script giveaway(in Example)

  • 1.4 Fixed main issue with DoubleKeys. Now you can get states(began, ended) for DoubleKeys

  • 1.3 Added Reset() and SpecifiedReset(). Added Demonstration

  • 1.2 Function state(began, ended) for UIS.InputBegan and UIS.InputEnded
    More states can be added

  • 1.1 Fixed func reset and tidier code

  • 1.0 First code

My slang)

Keys = table Keys
DoubleKeys = table DoubleKeys
keys = pressed keys

ComboKeys = table ComboKeys
ComboKey = one of the ComboKeys

ht = hold time

About Security

In this my Example script you can see I’m doing calculations on client. I know it’s not safe but he can’t do much, if he will get abnormal speed serverscript will detect it and kick him.

Usually you will use this:

KeyHandler.Keys[F] = function()
     ReplicatedStorage.RemoteEvent:FireServer(data)
end

I think, my module is a good solution to make your code tidier.

If you have any ideas or corrections, don’t hesitate to write them

6 Likes

I found mistake there. It resets previous func

self.Keys[input.KeyCode.Name] = self.DoubleKeys[input.KeyCode.Name]
task.wait(.4) --acceptable time between double press(changeble)
self.Keys[input.KeyCode.Name] = nil

Changed to this:

local prevKey = self.Keys[input.KeyCode.Name]
self.Keys[Key] = self.DoubleKeys[input.KeyCode.Name]
task.wait(.4)
self.Keys[Key] = input.KeyCode.Name

It now saves previous func.
Changed “input.KeyCode.Name” to “Key” for tidiness

There isn’t a huge performance difference as far as I’m aware of between CAS and UIS for you to need to worry about it, as long as you aren’t creating a ton of UIS connections you should be fine

What does “DoubleKeys” do? charlimit

You need press them twice. For example: shift for sprint, but if you press shift 2 times it will activate another ability

Oh ok, that’s neat, i’ll probably in up using this module, thanks

Please wait another 20 minutes, I’m little busy. I need to implement new feature, and fix double event call
Edit: Just don’t call “KeyHandler:Start” 2 times. You can put “KeyHandler:Start” before functions

Oh, i didn’t mean right now, but probably later tonight i will try it.

I understand. Thanks for feedback

No problem! charlimit

Hello everyone. New update is out.

New variable:

Holdtime = how much time player held this key (time between InputBegan and InputEnded)

Usability:
If player pressed “R” quickly then it will cast fireball but if he held “R” for 2 seconds it will cast Giant Fire Ball
or
The more you hold a ‘Q’ key, the wider the dash is

I’m proud of my module but it is so quiet in replies
I want to discuss with other developers, find out their reactions and etc

Edit: Do I need to change the topic’s name?

I think a multiple keys system would be cool like if you press multiple keys at the same time it triggers the callback overall, good module from what I been reading

Luckily, I have already used functions like that. I will implement this function(s) today.

1 Like

Hello everyone. I’m sad to announce that update is delayed due to school tomorrow.

I have question:
Should I add another InputBegan connection for ComboKeys? (Only input began, because if there is 3 or 4 buttons you don’t need fire function after stopped holding all of the buttons)

Because of my creativity I found 6 good ways to do this(more than 50 if we include variations)

Main issue now is that when checking ComboKeys with DoubleKeys and Keys it makes response little bit slower. I didn’t tested yet(tomorrow will) but
Should I add another InputBegan connection for ComboKeys?

The Keys and DoubleKeys will be as fast as usual, but for using ComboKeys you will need KeyHandler:ComboStart(). Soooo

What do we sacrifice?

Using only 2 connections or Keys and DoubleKeys speed

Also, I got an idea for SbSKeys(Step by Step keys) which you should press keys step by step(one by one) in less than 0.4 seconds(customizable) for something to happen(for example: open door or very powerful spell)

And mini question:
3 connections(Usual and InputBegan for ComboKeys)
or
4 connections(Usual and InputBegan, InputEnded for ComboKeys
If no one will answer I will make both( will use 4 connections and will add 3 connections in Unique functions). 3 connections are faster so I can not disapprove it. I think I will do both

Edit:

3 and 4 connections idea is ironically disapproved. The maximum optimized code for ComboKeys doesn’t affect speed. Also, current ComboKeys are better than both and can have functions of both

1 Like

ComboKeys is out. @PR0XlM. Check tutorial for this. I also maximized speed for ComboKeys that even when tested with previous version, the version with ComboKeys was almost equal (0.01 seconds faster or slower)

Next things on my plan:

  • SbSKeys(Step by Step Keys)

  • Unique function SimpleComboKeys. Something like this:

KeyHandler.SimpleComboKeys["Q+R"] = function(state, holdtime)
	
end

Edit:
If you have any idea, like literally any, you can write it and I will do my best to do it. Have a nice day, I went to sleep

Edit2:

Work on module is stopped for 1.5 days(for me it’s long time) due to my chores. If I could get 2 free days I think module’s version would be around 3.2

Edit3:

I’m happy to tell you that I almost finished SbSKeys. Announce date is tomorrow. UniqueFunc SimpleCombo is easy to do but it kinda makes functions untidy, so I make code samples that you will need to copy to be able to use SimpleComboKeys.

How about me cutting my module code into different sections(functions) and you will collect only that parts that you will use?
Kinda crazy idea but let me know your answer to that

1 Like

Hello everyone. I got some news

  • SimpleComboKeys are disapproved
    Explanation: it’s just limited version of Combo Keys

  • SbSKeys are disapproved, but added.
    Explanation:
    Use ComboKey with “Ordered = true” and “Repetitive = true”.
    You will get SbSKey ( Step by Step Key).

Version 2.0 is coming tomorrow

Sorry, update took more time than I expected. But here some spoilers:

  • ComboKey.Time = How much time he have to finish combo, if time is over all pressed keys will disactivate. (you can make puzzles with this) or ( you can use it to parkour as well ). (Only limits are your imagination(creativity, I don’t know the difference))

  • All Keys.MaxHoldTime = Maximum amount of time player can have between pressing and releasing button. For example: if MaxHoldTime = 5 and player still not releasing button it will no longer activate “ended” state or it will call another function
    (All Keys = Keys, DoubleKeys, ComboKeys)

  • DoubleKeys will be removed. Instead you will chose how many times you need to press a button. Long story short: You have more control, you can use DoubleKeys, TripleKeys, QuadrupleKeys, QuintupleKeys, SextupleKeys, SeptupleKeys… as many as you want. Even you can make player press button 999 times to activate function (just for the joke and 999 is not actual limit but I think we need a limit (nobody to argue with me).

  • Fixing bugs. I didn’t even know that “Ordered” wasn’t working. Changed “Complete”

And the biggest one:

The module will use metatables

(I learned them yesterday. You don’t need to know metatables to use module, the metatables will just improve the code writing add some features)
BTW: Global script optimization

Also all possible parameters to ComboKey

KeyHandler.ComboKeys[1] = {
	Keys = {}, --needed
	Ordered = true,
	Complete = false,
	Priority = true,
	ResetFuncs = true,
	Repetitive = true,
	Time = 10,
	MaxHoldTime = 2,
	Funcs = {},
	Func = function() --needed
		
	end,
}

With Version 2.0 the upgrade to the topic’s interface will come

Edit: (it’s not 1.9 but it’s 2.0 because of full code rewriting, optimizing with the power of metatables)

1 Like