Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: option to have overload default to starting key + pressed key #681

Open
firtrees opened this issue Mar 2, 2024 · 0 comments

Comments

@firtrees
Copy link

firtrees commented Mar 2, 2024

I'll start by thanking the developers for this tool, which I find to be very useful.
The rationale behind this request is similar to that of #651, in that I have a working configuration which is however verbose.
I would like to overload the space bar, which usually comes with some typing limitations; the workaround I am trying out is the following: while holding space, bound keys should work as instructed, while pressing an unbound key like a should produce the sequence space a.
This configuration nearly works as described:

# Overload space to produce sequences reminiscent of common terminal shortcuts
space = overload(terminallike, space)

	[terminallike]
	h = backspace
	j = enter
	k = tab 
		# the terminal uses "i" for that
		# but, unlike "i", "k" is not used much at the start of words
	l = delete
	[ = esc


	a = macro(space a)
	b = macro(space b)
	c = macro(space c)
	d = macro(space d)
	e = macro(space e)
	f = macro(space f)
	g = macro(space g)
#	h = macro(space h)
	i = macro(space i)
#	j = macro(space j)
#	k = macro(space k)
#	l = macro(space l)
	m = macro(space m)
	n = macro(space n)
	o = macro(space o)
	p = macro(space p)
	q = macro(space q)
	r = macro(space r)
	s = macro(space s)
	t = macro(space t)
	u = macro(space u)
	v = macro(space v)
	w = macro(space w)
	x = macro(space x)
	y = macro(space y)
	z = macro(space z)
	

	0 = macro(space 0)
	1 = macro(space 1)
	2 = macro(space 2)
	3 = macro(space 3)
	4 = macro(space 4)
	5 = macro(space 5)
	6 = macro(space 6)
	7 = macro(space 7)
	8 = macro(space 8)
	9 = macro(space 9)

	
	- = macro(space -)
	= = macro(space =)

I think it would be useful to add the possibility to have a layer activated by a key X (whether held or oneshot) to produce macro(X a) when an unbound key a is pressed.
An idea could be to allow for something like [layer:X] as a layer name (which would however cause problems if one wants to send both keys X and Y to the same layer), or maybe [layer:pass] (or something along these lines) to toggle this "passthrough" behaviour of the key.

I am unsure whether a pressed key should be considered released after this behaviour has occurred once: in my use case this scenario just doesn't happen, since I'm simply looking for a way to deal with the sequence <X on> <a on> <X off> <a off> (which admittedly looks like a common problems people seem to face), but I cannot imagine how people would intentionally exploit the feature by keeping X pressed.

Thank you for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant