belcher_ has joined #maemo-leste
belcher has quit [Ping timeout: 245 seconds]
cockroach has quit [Quit: leaving]
belcher_ is now known as belcher
cockroach has joined #maemo-leste
kvw_5 has joined #maemo-leste
kvw_5_ has quit [Ping timeout: 268 seconds]
Pali has quit [Ping timeout: 240 seconds]
cockroach has quit [Quit: leaving]
sunshavi has joined #maemo-leste
sunshavi has quit [Remote host closed the connection]
sunshavi has joined #maemo-leste
pere has quit [Ping timeout: 240 seconds]
cr4y1_ has joined #maemo-leste
pere has joined #maemo-leste
<parazyd> Yeah perhaps
Pali has joined #maemo-leste
tmlind_ is now known as tmlind
Mighty has joined #maemo-leste
nohit has quit [Ping timeout: 258 seconds]
nohit has joined #maemo-leste
<Wizzup> MartijnBraam: \o :p
<MartijnBraam> o/
<MartijnBraam> that did not go as smooth as I hoped
<Wizzup> I think it was fine
<parazyd> It's cool :)
<parazyd> MartijnBraam: Always blame Zoom :p It's the correct thing to do
<MartijnBraam> the irony of having a presentation about open standards and data privacy on zoom...
<parazyd> The irony of me doing it on Android
<parazyd> lol
<MartijnBraam> yeah :P
<siceloa> :D
<siceloa> what was?
<Wizzup> secret sauce
<parazyd> :p
<parazyd> siceloa: Soon(tm)
belcher has quit [Ping timeout: 252 seconds]
belcher has joined #maemo-leste
<tmlind> here's an experimental wip patch for booting with charger connected fyi: http://muru.com/linux/d4/uart-with-charger.patch
<tmlind> maybe ping uvos about it when he's around, i'll be gone in few mins
xmn has quit [Remote host closed the connection]
pere has quit [Ping timeout: 265 seconds]
pere has joined #maemo-leste
Mighty has quit [Quit: Connection closed for inactivity]
uvos has joined #maemo-leste
<uvos> can we have sdl with --enable-video-kmsdrm?
<uvos> parazyd:
ikmaak2 is now known as ikmaak
<uvos> tmlind: that patch seams to solve the issue :)
R0b0t1 has quit [Ping timeout: 268 seconds]
R0b0t1 has joined #maemo-leste
<parazyd> uvos: Are you talking about sdl2 or sdl1.2?
<uvos> parazyd: sdl2
<uvos> i have modified charging-sdl to work on d4, to exit when a rtc alarm fires, to exit when charging stops and to only run when charging is enabled.
<uvos> i also made a runlevel that just starts charging-sdl and then runs the default runlevel or shuts down depending how charging-sdl exits
<uvos> tldr working charging mode
<uvos> however i need sdl2 pacakged with --enable-video-kmsdrm
<uvos> and parazyd do you have a idea how to have a package crate a openrc runlevel in a sane way?
<parazyd> uvos: I could try lobbying upstream Debian to enable that for future releases, and we can fork it for Beowulf I suppose
<parazyd> uvos: For the runlevel, it is enough to create a directory in /etc/runlevels
<parazyd> So do that either with a Makefile or with a debian/foo.install
<parazyd> And you can add initscripts to it via a debian/postinst
<parazyd> rc-update del foo default; rc-update add foo customrunlevel
<parazyd> If you want it to completely clean up after a remove/purge, then make sure debian/postrm also unlinks that symlink or just does a rm -rf
<parazyd> (On /etc/runlevels/customlevel)
<uvos> ok ill try to package it as soon as we have the prerequisite sdl
<parazyd> Alright. I'll try to do it tomorrow. Currently finishing up a blog post :)
<parazyd> newsnewsnews
<parazyd> :D
<parazyd> uvos: That configure flag isn't exclusive to some other flag, right?
<uvos> parazyd: no and the newer cmake build system builds it by default
<inky> people, please review/accept the commit regarding the keyboard. not mine, but we talked about it. the one that would allow maemo keyboard to send characters to regular debian programs.
<inky> i just cannot without it. (:
<uvos> inky: its there
<uvos> in devel
<inky> hm, i updated several days ago.
<inky> oh.
<inky> i did not know about devel.
<inky> wait let me find out in wiki where is devel.
<uvos> what device are you on?
<inky> droid4
<uvos> ok not sure why you would want to use the vkb.. its uh. bad :P
<inky> well because my native language doesn't use latin characters (and i am the commiter of all previous vkb keyboards to leste)
<uvos> oh ok
<inky> and most of my communications, and even some domain names i type are in armenian.
<uvos> the vkb wont help you currently
<inky> so i need to use vkb.
<uvos> wont help you
<inky> why?
<uvos> the x11 backend supports us chareters only atm
<inky> was you the author of the patch?
<uvos> yes
<uvos> supporting more charecters is not hard
<uvos> but time consuming
<uvos> sec
<inky> yes, waiting.
<Entitlement> uvos - [ hildon-input-method/hildon-im-xcode.c at 260dc0cfbf91dd78ebcf48deca62ad407f33053... ]
<inky> i guess the problem is unicode. can you send the vkb input to unicode parser, that will..
<inky> let me see.
<uvos> inky: if you extend it with whatever you need from https://cgit.freedesktop.org/xorg/proto/x11proto/tree/keysymdef.h
<Entitlement> uvos - [ keysymdef.h - xorg/proto/x11proto - X.org X11Proto protocol headers. (mirrored f... ]
<uvos> it should wokr
<uvos> *work
<parazyd> hmm that's not convenient for an entire alphabet
<uvos> parazyd: no
<uvos> really someone should write a tool that parse keysymdef.h
<parazyd> Parse in what way?
<uvos> parse vs unicode names
<uvos> should be ok with a fuzzy match
<uvos> since the names in keysymdef are sane mostly
<uvos> but yeah its not great
<inky> wait, what do you get from vkb - unicode text stream?
<inky> or something else?
<uvos> inky: yeah unicode text stream
<uvos> inky: and then we need xkeysyms somehow
<uvos> so we can map those to xkeycodes
<uvos> the next problem is that xkeycodes only exist for syms in the current map
<inky> trying to understand. you get unicode stream, but you cannot send that to X, so you send keysyms.
<uvos> yeah you have to send keycodes to x
<uvos> not keysyms either
<uvos> but those you can convert easy
<inky> yeah yeah keycodes.
<inky> but then it, according to xkb, should choose the characters to type.
<inky> hmmmm.
<parazyd> We could have different files for different layouts
<parazyd> Then it might not be so convoluted
<uvos> parazyd: ?
<parazyd> I mean if it has to be done with a switch like that
<inky> but wait. xkb layouts do not correspond to our vkb layouts.
<uvos> here listen for a second
<uvos> so
siceloa has left #maemo-leste ["User left"]
<uvos> input in x works like this: if you want to send a symbol like lets say EPSILON. you have to first transpose it into a keycode witch is 0-255 via the keymap. you can ask x to do this for you.
<uvos> the client that you sent the code then takes it and asks x "whay symbol is this" and x transforms it int a sym again based on the keymap
<uvos> as there are only 255 keycodes availble the map cant have every symb.
<uvos> so if you try to send a symb. that not on the map it fails
<uvos> the way other vkbs work around this is they modify the keymap for 1 second or there about send the keys and change it back
<Wizzup> heh
<uvos> sadly due to a x protocoll limitation this is the only possible way
<Wizzup> I got stuck with some of this in the qt5 port (mapping qt5 keysyms to things to send to h-i-m)
<uvos> as the keycode is 8 bit
<uvos> so rn
<uvos> if inky adds his symbols to the switch-case it will send all the codes it can and the others it will wan about.
<uvos> if he sets his keymap to also include the symbols he wants everything will work
<uvos> and then we can additionally implment the workaround above
<uvos> (but its terribly racey)
<uvos> since you can guarentee that x will change the keymap in time
* inky searching for that repo with layouts i commited
<Wizzup> sicelo: ping
<uvos> i hope that was reasonably understandable
<Wizzup> uvos: yes, ty
<sicelo> Wizzup: Wizpong
<sicelo> Um, this client doing weird stuff
<Wizzup> dropped you a pm
<Entitlement> inky - [ hildon-input-method-plugins/hy_AM.xml at master · maemo-leste/hildon-input-metho... ]
<inky> but here we have unicode characters and layout only.
<uvos> inky: thats right, the vkb uses that to give him the unicode text stream
<uvos> inky: and him then must either give this wholesale to the client if it can (via the custom him protocol atoms) or if it needs to fall back to plain X it needs to tansfrom these to keycodes somehow, and since the keycodes are diferent depending on hwkbd map we want them in xkeysyms.
<uvos> since the keysyms are static and we can have x deal with the translation to keycodes
<inky> so ok, sorry i am slow to understand.
<inky> what i don't understand is
<inky> lets say we converted unicode character to keycode.
<inky> i don't even know how to express this.
<inky> you mean, we need to change the xkb layout, then send the keycode, that in that xkb layout corresponds to the unicode character we send?
<inky> so we also need to change xkb layout?
<inky> otherwise how we get the keycode from the unicode character?
<inky> the keycode only makes sense if there is xkb layout. no?
<uvos> yeah so the charecter you want to send needs to be in the xkb layout somewhere
<uvos> due to how x works you cant send a greek delta or whatever if its not in the xkb layout
<inky> then may be it is easier to get rid of our vkb keyboards, and generate new vkb layouts based on xkb...
<inky> oh that's too many layouts then...
<inky> i am thinking of beautiful solution for every layout/language, and cannot find it.
<uvos> inky: problem with that is that in no way do we want the hwkb to need to be the same as the vkb
<uvos> on d4 for instance if you change xkb map to include the XK_ARMENIAN symbols the hwkb will be useless
<uvos> so they way to do this imo is to change to whatever xkb map has the symbols you want wen the vkb is open, and hope no one notices that by trying to type on the vkb and hwkb at the same time.
<uvos> or switch to wayland
<uvos> problem totaly goes away with wayland.
<uvos> since it uses 32bit keycodes
<parazyd> Can the X clipboard help with this in any way?
<uvos> X dose have a very seldomly used 3rd clipboard
<uvos> that would work for some input fields but problem with that is that many applications simpy want keycodes
<uvos> for many interactions
<parazyd> True
<uvos> also the 3rd clipboard only works with some toolkits
<uvos> gtk3 for instance totaly dosent register it
<parazyd> It could be any clipboard really
<parazyd> But yeah, it's not ideal
<uvos> and useing the 1 or second clipboard would overwrite the stuff the user has in it
<uvos> i gues you could save it and then restore it
<Entitlement> parazyd - [ GitHub - maemo-leste/clipboard-manager: The clipboard manager is responsible for... ]
<uvos> but then we are in the weeds again just like with the keycoads ;)
<parazyd> Yeah yeah, was just a random idea
<inky> ok
<inky> i have an idea
<uvos> parazyd: its not bad :)
<inky> we can hardcode (not a good word but still)
<inky> the map - our vkb layout - xkbmap that contains those symbols that come from vkb layout
<uvos> inky: yeah that works
<uvos> to an extent
<uvos> but you only have 255 keys total
<inky> let's say my hy_AM.xml uses symbols that are in 'am' xkb map.
<uvos> so you cant map everything
<uvos> you could map all the d4 keys
<uvos> and have many left over for sure
<inky> i don't need to use hwkb for armenian. i want to use on screen kbd. one day i'll get a pinephone, and it has no hw kbd.
<uvos> but doing this for every language is a huge undertaking
<parazyd> I mean, two alphabets for sure fits in the 255
<parazyd> So the vkb could be switched on a per-need basis
<inky> i mean, will that solve the issue if
<inky> i get you a mapping - this xml corresponds to this xkb layout?
<uvos> inky: i dont need that
<uvos> i just need a way to trasfrom unicode to xkeysymbs
<uvos> all xkeysymbs are allways available
<uvos> so the vkb frontend dosent have to care about anything else.
<inky> i don't know what is xkeysyms probably. i know keycodes, and i know unicode.
<inky> let me see
<uvos> so xkeysymbs are a mechanisum x uses to tell applications what a keycode is suposed to mean right now
<uvos> so if we map keycode 42 to A in xkb the applicaiton just gets sent 42
<uvos> to then know what to print
<uvos> it asks X what is 42?
<uvos> and the awnser it gets is the xkeysymb for A
<uvos> xkeysymbs are kinda like unicode
<uvos> just old and bad :P
<uvos> the key here being that if you change the xkb map so that your A key on the keyboard is now keycode 66 the application will still get the same xkeysymb A if it asks x what is 66.
<uvos> inky: did that clear it up for you?
<parazyd> uvos: Would XStringToKeysym function work?
<uvos> parazyd: haha
<uvos> parazyd: no
<parazyd> ?
<inky> i found that xkbcommon/xkbcommon-keysyms.h contains the symbols used in xkb configs.
<uvos> parazyd: i use that
<uvos> parazyd: it only dose A-Z a-z and 0-9
<inky> i think that works only for alphanumericals
<uvos> thats why those are not in the switch case
<parazyd> oh lol
<inky> yes. just read that.
<parazyd> ok
<uvos> acctually what it dose
<uvos> is it transforms the keysymb name to its value like "XK_Armenian_but" to 0x100055d
<uvos> but not "blabala" to various values
<uvos> except that A-Z and a-a and 0-9 are named literaly
<parazyd> I see
<inky> ok i think i can write a parser you need. just explain me better what i need to generate.
<inky> i can generate some header file for you with definitions.
<inky> or some map that you can use instead of that switch.
<uvos> inky: for any unicode string "Whater you want here" it needs to output an array of keysyms like {0x100058a, 0x10010f0, ...} as defined here https://cgit.freedesktop.org/xorg/proto/x11proto/tree/keysymdef.h
<Entitlement> uvos - [ keysymdef.h - xorg/proto/x11proto - X.org X11Proto protocol headers. (mirrored f... ]
<uvos> or just a utf32 -> keysym table
<uvos> maybe you can find sutch a thing
<uvos> maybe some toolkit has this for its internal conversion
<parazyd> Evil_Bob: Maybe you know something like this? ^
<inky> uvos: in that last header file (i found one like that on my system) we have a mapping like this:
<inky> XK_Armenian_AYB and its unicode character.
<uvos> inky: yeah the keysymbs added recently
<inky> we also have the mapping like keycode and XK_Armenian_AYB in xkb file 'am'
<uvos> corrispond to the unicode value
<uvos> but thats not true for the old ones
<inky> so based on two files, based on xkb mappings and this header
<inky> i can generate a header that maps
<inky> i can generate a header that has several fields.
<uvos> the mapping XK_Armenian_AYB in xkb dosent help us at all
<uvos> we dont care about that
<inky> that XK_Armenian_AYB is used in xkb file 'am' where i can find the keycode from.
<uvos> we care about what unicode char corrisponds to XK_Armenian_AYB and also XK_botvertsummationconnector etc
<inky> the unicode char is in the header file you gave me.
<inky> that maps these XK symbols to unicode chars.
<inky> but not to keycodes.
<uvos> inky: no it dosent
<uvos> inky: it maps them to x'es internal reprisentation of the symbols
<uvos> inky: somethimes these are the same as unicode
<uvos> inky: but not allways
<inky> oh.
<inky> because for armenian it looks the same:
<inky> #define XK_Armenian_AYB 0x1000531 /* U+0531 ARMENIAN CAPITAL LETTER AYB */
<uvos> read the top of the header
<uvos> * Where a keysym corresponds one-to-one to an ISO 10646 / Unicode
<uvos> * character, this is noted in a comment that provides both the U+xxxx
<uvos> * Unicode position, as well as the official Unicode name of the
<uvos> * character.
<uvos> *
<uvos> * Where the correspondence is either not one-to-one or semantically
<uvos> * unclear, the Unicode position and name are enclosed in
<uvos> * parentheses. Such legacy keysyms should be considered deprecated
<uvos> * and are not recommended for use in future keyboard mappings.
<uvos> also some of those are strait unicode
<uvos> and for some they add 0x01000000
<uvos> so we need something that dose all of this transformation for us
xes_ has quit [Ping timeout: 265 seconds]
<Entitlement> inky - [ pynput._util.xorg — pynput 1.1.2 documentation ]
<inky> it seems that
<inky> it has the function def keysym_is_latin_lower(keysym):
<inky> and
<inky> same for upper
<inky> and it also has other cases in other function
<inky> one of the functions "Generates a mapping from *keysyms* to *key codes* and required modifier shift states."
<inky> but we need utf-8 to keysyms right?
* inky continues searching
<uvos> right that dosent help us at all
<uvos> go check out the sources for toolkits
<uvos> they need to do what we need to do in reverse
<uvos> so it must be out there somewhere
<inky> did you ask on #xorg?
<inky> may be they will know.
<uvos> no
<uvos> my ego suggestsed that if i cant figure it out without writing the table by hand no one can :D
<uvos> maybe you should ask :P
<Entitlement> inky - [ node-keysym/keysyms.txt at master · substack/node-keysym · GitHub ]
<uvos> inky: sweet
<uvos> thats it
<uvos> now we need that in c
<uvos> but we can parse that file
<uvos> "This library converts among X11 keysyms, unicodes, and string names in node.js."
<uvos> what why!? :D
<parazyd> lol
<uvos> inky can you create an issue on the bugtracker for someone to write a c function to parse that and with that link?
<inky> i can, just i am not sure i understand well what is needed. may be i can write something.
<parazyd> Why not generate some header from it?
<inky> so you want a library or header file?
<uvos> a header with that as array
<inky> that's what i am saying. can we generate a header from that?
<uvos> and then a funciton to use it
<parazyd> Yeah
<inky> amazing. i am glad it'll help.
<uvos> inky: thanksto your help ;)
<uvos> inky: after that you just need to create a xkb map that includes the keycodes the d4 hwkbd nees and also the keysymbs you want to use
<parazyd> Is that something we could dynamically switch via some settings option?
<uvos> then it should wor, for you at least, doing sutch xkb map for every lang is the next problem
<uvos> parazyd: not really
<uvos> you would have to write the maps by hand
<uvos> or switch the vkb exisiting maps that include the keysymb by reverse search when its open and then switch back when it closes
<uvos> as mentioned before
<uvos> the later is how onboard works
<parazyd> mhm
<parazyd> ok
<inky> uvos: i don't need a droid4 hw keyboard for typing armenian. i just need vkb to work with xorg programs. (:
<uvos> inky: then you can just switch xkb to whatever layout you would use of an armenian keyboard
<uvos> *for an
<inky> you mean now or when you integrate this new header?
<uvos> after the header
<inky> so even after the header, there is a need to manually do setxkbmap for vkb to work?
<uvos> for now yeah
<uvos> we were discussing the soltion to that above
<inky> i can do that, but i think of others now.
<inky> i think then it'll be possible to map vkb layout to xkb layout.
<inky> so that the xkb layout change will be automatic.
<uvos> inky: yeah its easy
<inky> that would be amazing!
<uvos> inky: we can even pilfer the code from the suckless keyboard
<inky> oh i don't know about suckless kbd. will look. i know the suckless project though.
<parazyd> svkbd
<inky> amazing!
<inky> i'll use it on my soc that is connected to the tv.
<inky> but on maemo it won't be usable so i'll wait for you to integrate changes.
<Wizzup> uvos: can't him switch the kbd?
<uvos> Wizzup: hmm?
<Wizzup> it has support for multiple languages/layouts/keyboards and switching with hotkeys
<uvos> Wizzup: the xkeymap
<uvos> Wizzup: not the viusual keyboard
<Wizzup> iirc you can switch between physical keyboard layouts
<Wizzup> with h-i-m
<uvos> Wizzup: your missing the problem entirely
<uvos> Wizzup: please read above
<Wizzup> ok
cr4y1_ has quit [Ping timeout: 240 seconds]
<kek> sicelo opened a pull request: https://github.com/maemo-leste/maemo-leste.github.io/pull/15 (Fix minor typo)
<parazyd> sicelo: Can I merge it or are you going to commit more?
<sicelo> Maybe merge. I might not have more time, and my internet is working slower than snail mail today
<kek> parazyd closed a pull request: https://github.com/maemo-leste/maemo-leste.github.io/pull/15 (Fix minor typo)
<parazyd> ok. Thanks for checking it!
uvos has quit [Quit: Konversation terminated!]
uvos has joined #maemo-leste
uvos has quit [Ping timeout: 252 seconds]
cockroach has joined #maemo-leste
Pali has quit [Ping timeout: 240 seconds]
R0b0t1 has quit [Ping timeout: 268 seconds]
R0b0t1 has joined #maemo-leste