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: Tooltips customize the display position and display text, instead of just displaying an icon at the mouse position. #1521

Open
lnfuhl opened this issue Feb 6, 2025 · 3 comments
Labels
enhancement New feature or request gui Pertains to GUI functionailty, jtroo does not maintain GUI functionality

Comments

@lnfuhl
Copy link

lnfuhl commented Feb 6, 2025

Is your feature request related to a problem? Please describe.

This is like the tooltip in the ahk. I put the layer name switch on the right toolbar as shown below.

Image

Image

By the way, does Kanata have a command to directly turn off capslock, just like the "SetCapslockState false command" in ahk?

Describe the solution you'd like.

As above

Describe alternatives you've considered.

As above

Additional context

No response

@lnfuhl lnfuhl added the enhancement New feature or request label Feb 6, 2025
@lnfuhl lnfuhl changed the title Tooltips customize the display position and display text, instead of just displaying an icon at the mouse position. Feature request: Tooltips customize the display position and display text, instead of just displaying an icon at the mouse position. Feb 6, 2025
@gerhard-heide
Copy link

By the way, does Kanata have a command to directly turn off capslock, just like the "SetCapslockState false command" in ahk?

On Windows I use (cmd AutoHotkey numlockoff.ah2) in kanata to call an ahk script

#Requires AutoHotKey 2
#NoTrayIcon
state := GetKeyState("NumLock", "T")
if (state) {
	SetNumLockState False
}

I think that is the easiest way, I prefer it over
(cmd-output-keys powershell.exe -NoProfile -NoLogo -NonInteractive "if ($([console]::NumberLock) -match 'True') { echo '(NumLock)' } else { echo '()' }") though I have forgotten why.

@lnfuhl
Copy link
Author

lnfuhl commented Feb 7, 2025

@gerhard-heide Thanks!

In my use case, I use the Caps Lock key to tap to switch the layer to ace layer, which is designed for navigation, deletion, uppercase and lowercase switching and other text operations. Among them, the uppercase and lowercase switching is performed by pressing Caps Lock once into acelayer and then press C, but I want to set two separate keys in acelayer to turn on and off uppercase respectively.

My code is as follows:

(defalias
  cl (layer-switch acelayer)     
  bl (layer-switch base)
  crl (layer-switch cellar)
  col (tap-hold-press 200 200 grv (layer-while-held console))
  tl (layer-while-held tablayer)
  nl (layer-switch numpad)

  ext (on-press tap-vkey switch-to-base)
  sChn (macro A-S-2 @ext)
  sEng (macro A-S-1 @ext)
  siptEsc (macro A-S-1 esc @ext)
  sEsc (macro esc @ext)
  sEnt (macro ent @ext)
  sCaps (macro caps @ext)
  sSave (macro C-s @ext)

  ltab (tap-hold-press 200 200 tab @tl)
  rtab (tap-hold-press 200 200  [ @tl)
  hdel (macro S-home bspc)
  wdel (macro C-S-right C-S-left bspc)
  lup (macro up up up up up up up up up up up up up up up)
  ldn (macro down down down down down down down down down down down down down down down)

)

(deflayer (acelayer icon star.png)
  esc  f1   f2   f3   f4      f5   f6   f7   f8      f9   f10  f11  f12                                                   ;;13 esc
  @col  M-;    f2    @nl    4    5    6    7    8    9    0    -    =    bspc                                                   ;;14 grv
  @ltab  home    w    up    tab    @hdel    @wdel    C-left    C-right    pgup    p    @rtab    _    _                    ;;14 tab
  @cl  end  left  down  right    bspc    @sEsc    @ldn    @lup    pgdn    @sSave    @cl    ent                               ;;13 caps
  lsft menu   del  @sCaps    @sEng    @sEnt    @siptEsc     @sChn   ,    .    /    rsft    up                                      ;;13 shift
  lctl lmet lalt            @bl             ralt rmet rctl    left   down  right                                          ;;13 ctrl
)

@gerhard-h
Copy link
Contributor

I want to set two separate keys in acelayer to turn on and off uppercase respectively.

kanata does not know about the current state of CapsLock, that why I suggested ahk or powershell.

But another idea is sCaps (multi caps (layer-switch base-with-caps-on)) where base-with-caps-on also calls acelayer-with-caps-on...

@jtroo jtroo added the gui Pertains to GUI functionailty, jtroo does not maintain GUI functionality label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gui Pertains to GUI functionailty, jtroo does not maintain GUI functionality
Projects
None yet
Development

No branches or pull requests

4 participants