Comments (8)
Okay,
I am new to lua and awesomewm. I will give it a shot and let you know.
from modalawesome.
Hi,
for special keys you have to find out which string the callback function gets for a key. For <Tab>
this is is 'Tab'
, so if you want to use <Tab>
for a command your pattern should look like {'Tab'}
. On a side note, you could also use {'T', 'a', 'b'}
, but then you could also press <Shift>t
, then a
and then b
for a match.
What do you mean with chords?
from modalawesome.
Hi,
for special keys you have to find out which string the callback function gets for a key. For<Tab>
this is is'Tab'
, so if you want to use<Tab>
for a command your pattern should look like{'Tab'}
. On a side note, you could also use{'T', 'a', 'b'}
, but then you could also press<Shift>t
, thena
and thenb
for a match.
Hi, thanks for replying quickly. This works.
What do you mean with chords?
Keys combinations like <C-a>
and <Shift-Tab>
.
from modalawesome.
Keys combinations like
<C-a>
and<Shift-Tab>
.
Ah I see. Support for this is limited. You can map <Shift>
in combinations with letters, e.g. <S-a>
, because then the callback function is called with the uppercase letter 'A'
, so a pattern like {'A'}
works, but that's it.
It would be possible however to support other modifiers, since the callback is also called with a table of pressed modifiers, which is currently ignored.
from modalawesome.
It would be possible however to support other modifiers, since the callback is also called with a table of pressed modifiers, which is currently ignored.
And how can I do it?
from modalawesome.
Since as of now this functionality does not exist in modalawesome, you'd have to implement it first. I'd do it like this:
- add optional
modifiers
table to commands, which should contain required modifiers - in keygrabber callback pass the modifiers table to parser function
- in parser function compare the modifier table of command with the one from the callback
- if there's a match execute corresponding handler
I have some time at the end of the month were I can take a look at this. Until then, pull requests are welcome :)
from modalawesome.
So I finally had some time to take a look at this. The feature is now functional, but I still want to think about it a little bit more, before I merge this. Feel free to check out the pull request in the mean time and tell me if it suits your needs :)
from modalawesome.
Thanks a lot. I have been busy, I will check out the PR and let you know.
from modalawesome.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modalawesome.