Giter VIP home page Giter VIP logo

Comments (17)

tekezo avatar tekezo commented on June 20, 2024

The current behavior is intended.
Please describe why you want to trigger event.

from karabiner-archived.

franciscolourenco avatar franciscolourenco commented on June 20, 2024

There is this plugin to smoothly scroll with the keyboard. It uses directional keys to move, and the modifiers to change the speed. The speed change is applied as soon a modifier is pressed, so the user never has to release the directional keys and can use the modifiers to accelerate/slowdown according to content of the page.

Using homerow mode though, the lazy_key_modifiers never get triggered if the directional key is already being pressed, so no speed change, unless the directional key is pressed again.

Having a lazy_key sensible to key repetition would make this issue go away.

from karabiner-archived.

tekezo avatar tekezo commented on June 20, 2024

It's a limitation that we cannot change repeated key behavior during repeating.
We need to add new VirtualKey like VK_MOUSEKEY.
(VK_MOUSEKEY_HIGHSPEED is close to what you want to do.)

https://github.com/tekezo/KeyRemap4MacBook/blob/master/src/core/kext/VirtualKey/VK_MOUSEKEY.cpp

If you can do, I welcome pull requests.
If not, I'll add it someday.

from karabiner-archived.

franciscolourenco avatar franciscolourenco commented on June 20, 2024

Trying to understand this..
What would the new VirtualKey be used for?

from karabiner-archived.

tekezo avatar tekezo commented on June 20, 2024

We should add 2 types of VirtualKey.

One is direction keys.

  • VK_ACCELERATABLE_UP
  • VK_ACCELERATABLE_DOWN
  • VK_ACCELERATABLE_LEFT
  • VK_ACCELERATABLE_RIGHT

One is accelation key.

  • VK_ACCELERATABLE_ACCELATION_X2
  • VK_ACCELERATABLE_ACCELATION_X3
  • VK_ACCELERATABLE_ACCELATION_X4

These are correspond to VK_MOUSEKEY_UP,VK_MOUSEKEY_DOWN,... and VK_MOUSEKEY_HIGHSPEED.

from karabiner-archived.

franciscolourenco avatar franciscolourenco commented on June 20, 2024

What will VK_ACCELERATABLE_ACCELATION do to VK_ACCELERATABLE_UP?
Accelerate the key repeat rate?

Is there any way of compiling and running keyboardremap4macbook without having to create a package and install it?

from karabiner-archived.

tekezo avatar tekezo commented on June 20, 2024

VK_ACCELERATABLE_UP sends KeyCode::CURSOR_UP events periodically by timer.

VK_MOUSEKEY_HIGHSPEED modifies a magnitude of X,Y movements in timer callback.
VK_ACCELERATABLE_ACCELATION_X2 changes count of KeyCode::CURSOR_UP in time callback as well.

You can replace core components temporary by following commands.
(It will be reset when you reboot machine.)

update kext:
$ cd src/core/kext
$ make
$ make reload

update server:
$ cd src/core/server
$ make
$ make run

from karabiner-archived.

franciscolourenco avatar franciscolourenco commented on June 20, 2024

Sorry for being so much time away from this issue.
Now that I understand better what you were suggesting, I think it is not what I was looking for.

In my application, I'm not measuring the repeat rate to control the speed. In fact the repeat rate is completely ignored and the movement is totally independent from it.

I'm looking for the lazy_modifier keys to be activated if I press them while a directional key is already being pressed. Currently this doesn't happen as they are only activated when another key is pressed after them, but not before.

That's why I talked about the repetition: If the lazy modifiers would activate, not only on key press but also on repetition, they would become enabled even if the other key is already being pressed and is repeating.

Thank you so much for the help! :)

from karabiner-archived.

tekezo avatar tekezo commented on June 20, 2024

It might not be suitable for your settings because I've forgotten your environment status.
But HoldingKeyToKey is the only way to fire event for lazy modifier.

    <autogen>
      __HoldingKeyToKey__
      <!-- from -->
      KeyCode::OPTION_L,
      <!-- to -->
      KeyCode::VK_LAZY_OPTION_L,
      <!-- separator -->
      KeyCode::VK_NONE,
      <!-- holding -->
      KeyCode::OPTION_L,
    </autogen>

from karabiner-archived.

franciscolourenco avatar franciscolourenco commented on June 20, 2024

Sorry, I think I don't understand exactly what is the behaviour of HoldingKeyToKey and what each parameter does..
Can you give some more details?

Thank you

from karabiner-archived.

tekezo avatar tekezo commented on June 20, 2024

HoldingKeyToKey changes a key to two kinds.
(1) When you press and release a key immediately.
(2) When you hold down a key.

You can specify this two keys by separating KeyCode::VK_NONE.
There are some examples:
https://github.com/tekezo/KeyRemap4MacBook/blob/master/src/core/server/Resources/include/checkbox/samples.xml#L553

You can adjust a threshold of holding down time by "[Holding Key to Key] Holding Threshold" in Key Repeat tab on Preferences.

from karabiner-archived.

franciscolourenco avatar franciscolourenco commented on June 20, 2024

I'm trying to implement some ideas you gave me and also clean homerow_mode.xml which seems to be a bit messy.

However I forgot how to built checkbox.xml and include it. The documentation I found only teaches how to build the entire app or how to use private.xml. Can you revive my memory?

Thanks

from karabiner-archived.

tekezo avatar tekezo commented on June 20, 2024

Please execute these command in Terminal.app.

cd src/core/server/Resources
make install

Then, checkbox.xml and include xml files will be updated and reloaded.

from karabiner-archived.

franciscolourenco avatar franciscolourenco commented on June 20, 2024

Sweet it's even more streamlined!
Thanks

On Wednesday, 27 March 2013 at 13:30 , Takayama Fumihiko wrote:

Please execute these command in Terminal.app.
cd src/core/server/Resources
make install
Then, checkbox.xml and include xml files will be updated and reloaded.

โ€”
Reply to this email directly or view it on GitHub (#72 (comment)).

from karabiner-archived.

franciscolourenco avatar franciscolourenco commented on June 20, 2024

By the way, are you using any one of these 2 option?
Because I'm not using them, was thinking about deleting them as their use seems far fetched.
Screen Shot 2013-03-27 at 15 50 08

from karabiner-archived.

franciscolourenco avatar franciscolourenco commented on June 20, 2024

Hi, I'm trying to catch an EXTRA1 like this:

<autogen>__KeyToKey__ KeyCode::D, ModifierKey::EXTRA1, KeyCode::OPTION_L</autogen>

However, the EXTRA1 doesn't seem to be activated or catched. There are the 3 ways I've been trying without success:

<autogen>__KeyToKey__ KeyCode::K, KeyCode::CURSOR_DOWN, KeyCode::VK_MODIFIER_EXTRA1</autogen>
<autogen>__KeyToKey__ KeyCode::K, KeyCode::CURSOR_DOWN, ModifierFlag::EXTRA1</autogen>
<autogen>__KeyToKey__ KeyCode::K, KeyCode::CURSOR_DOWN | KeyCode::VK_MODIFIER_EXTRA1</autogen>

Any idea on how to make this work?

from karabiner-archived.

tekezo avatar tekezo commented on June 20, 2024

@aristidesfl
I do not know the usage of "Option+O to Tab" or other options because
other general users seems to use "Home Row Arrow mode".

This autogen works on my machine.

    <autogen>__KeyToKey__ KeyCode::D, ModifierFlag::EXTRA1, KeyCode::OPTION_L</autogen>
    <autogen>__KeyToKey__ KeyCode::K, KeyCode::CURSOR_DOWN, KeyCode::VK_MODIFIER_EXTRA1</autogen>

If you want to repeat Down key, use these autogens.

  <item>
    <name>My Custom Setting</name>
    <identifier>private.my_custom_setting</identifier>
    <block>
      <config_only>notsave.homerow_flags1</config_only>
      <autogen>__KeyToKey__ KeyCode::D, KeyCode::OPTION_L</autogen>
    </block>
    <autogen>
      __KeyToKey__
      KeyCode::K,
      KeyCode::CURSOR_DOWN,

      Option::KEYTOKEY_BEFORE_KEYDOWN,
      KeyCode::VK_CONFIG_FORCE_ON_notsave_homerow_flags1,

      Option::KEYTOKEY_AFTER_KEYUP,
      KeyCode::VK_CONFIG_FORCE_OFF_notsave_homerow_flags1,
    </autogen>
  </item>

  <item hidden="true">
    <name>flags</name>
    <identifier vk_config="true">notsave.homerow_flags1</identifier>
    <autogen>__ShowStatusMessage__ moge</autogen>
  </item>
```xml

from karabiner-archived.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.