Giter VIP home page Giter VIP logo

Comments (16)

blueyed avatar blueyed commented on August 17, 2024

You can use xev to look at what keycodes are used / triggered for this.
Do you get Left for AltGr + h there?

You maybe have to map these additionally.

from awesome.

ivanbalashov239 avatar ivanbalashov239 commented on August 17, 2024

yes in xev it's work well, all keycodes as i set in xkb layout.

from awesome.

ivanbalashov239 avatar ivanbalashov239 commented on August 17, 2024

@blueyed

KeyRelease event, serial 33, synthetic NO, window 0x4200001,
    root 0x91, subw 0x0, time 149363376, (432,309), root:(434,333),
    state 0x80, keycode 44 (keysym 0xff51, Left), same_screen YES,
    XKeysymToKeycode returns keycode: 113
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4200001,
    root 0x91, subw 0x0, time 149363648, (432,309), root:(434,333),
    state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes: 

so this is xev for AltGr + h, where ISO_Level3_Shift is AltGr and Left is h
keycode 44 is h key
keycode 113 is Left key
constructions with ISO_Level3_Shift like this:

 awful.key({ modkey, "ISO_Level3_Shift"  }, "Left", awful.tag.viewnext ), 
 awful.key({ modkey, "ISO_Level3_Shift"  }, "#113", awful.tag.viewnext ),

not work

from awesome.

Elv13 avatar Elv13 commented on August 17, 2024

A little hint
https://github.com/awesomeWM/awesome/blob/master/common/xutil.c#L90

from awesome.

ivanbalashov239 avatar ivanbalashov239 commented on August 17, 2024

@Elv13
Nice try, but I still do not understand what kind of modifier AltGr.
I'm still not sure that I can patch it myself, could you tell a little more detail.

from awesome.

Elv13 avatar Elv13 commented on August 17, 2024

It is not in the list, so I doubt is can work without patching that function and the one below it. I may be wrong

from awesome.

ivanbalashov239 avatar ivanbalashov239 commented on August 17, 2024

@Elv13
Ok, i understand. Do you think it's bug? Could you tell me the best way to check this solution without reinstall awesome or distributive? Maybe some install to opt? On Arch Linux

from awesome.

Elv13 avatar Elv13 commented on August 17, 2024

This is the C code, so you have to patch and recompile. It is not a bug, just not a feature

from awesome.

ivanbalashov239 avatar ivanbalashov239 commented on August 17, 2024

@Elv13 i understand, so i can't install it near my awesome like testawesome? Ok i'll try. Thanks.

from awesome.

Elv13 avatar Elv13 commented on August 17, 2024

You don't have to install awesome, just compile it

from awesome.

ivanbalashov239 avatar ivanbalashov239 commented on August 17, 2024

@Elv13 oh, ok, compile and run, you awesome

from awesome.

blueyed avatar blueyed commented on August 17, 2024

@Elv13
Do you think the problem is that awesome does not recognize the modifier and then ignores the key?

I would have thought that it should look just like Left to awesome.

AltGr-h looks like this for me (keycode 43, not 44):

KeyPress event, serial 28, synthetic NO, window 0x4400001,
    root 0x94, subw 0x0, time 150651320, (98,91), root:(99,92),
    state 0x0, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x4400001,
    root 0x94, subw 0x0, time 150652536, (98,91), root:(99,92),
    state 0x80, keycode 43 (keysym 0x2b1, hstroke), same_screen YES,
    XLookupString gives 2 bytes: (c4 a7) "ħ"
    XmbLookupString gives 2 bytes: (c4 a7) "ħ"
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x4400001,
    root 0x94, subw 0x0, time 150652687, (98,91), root:(99,92),
    state 0x80, keycode 43 (keysym 0x2b1, hstroke), same_screen YES,
    XLookupString gives 2 bytes: (c4 a7) "ħ"
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x4400001,
    root 0x94, subw 0x0, time 150654217, (98,91), root:(99,92),
    state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

And using the following makes awesome somehow grab it, but the function is not called then:

awful.key({ "Any" }, "hstroke",   function (c) put_client(c, 0.5, 0.0, 0.5, 0.5) end),

Without the call to awful.key I get ħ, but with the call nothing arrives in the app (terminal or (g)vim).

from awesome.

Elv13 avatar Elv13 commented on August 17, 2024

According to a quick google, AlternateGraphic is "Mod5" (2^7), but it doesn't work at all. "Any" work does grab the input and execute the function on my computer. xcb_mod_mask_t doesn't have anything above that, but any grab all until 2^15 so maybe AltGr is somehow mapped to something above the maximum for xcb_mod_mask_t, but that would be very, very strange as it conflict with common sense and other implementations. Your not alone to have trouble with AltGr and XCB:
https://bugreports.qt-project.org/browse/QTBUG-34068?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=462

from awesome.

blueyed avatar blueyed commented on August 17, 2024

Using Mod5 works for me:

awful.key({ "Mod5" }, "h", function() naughty.notify({text="AltGr-h"}) end),

@seniorivn
Have you tried this already?

from awesome.

ivanbalashov239 avatar ivanbalashov239 commented on August 17, 2024

@blueyed oops...
I tried it just now, and it works, apparently this is exactly what I need, I do not know how it happened that i didn't try it.

from awesome.

blueyed avatar blueyed commented on August 17, 2024

Cool, closing the issue then.

I've looked into xmodmap a bit myself yesterday.

from awesome.

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.