I don't know if it's already been done, but here's a little script
that reads in all key bindings from enlightenment_remote, and
substitutes all uses of ALT with WIN.

Just thought it might be useful to someone.  If there's a better
solution out there, please tell me!

#!/usr/bin/ruby -w

DEBUG=false

def mkdelcmd(*args)
    args[2].gsub!("ALT", "WIN")
    "enlightenment_remote -binding-key-del '#{args.join("' '")}'"
end

def mkaddcmd(*args)
    "enlightenment_remote -binding-key-add '#{args.join("' '")}'"
end

keylist = `enlightenment_remote -binding-key-list`

for line in keylist
    line.chomp!
    m = /^REPLY:\ BINDING CONTEXT=(\w+)\ KEY="(.+)"\ MODIFIERS=(\S*)\
ANY_MOD=(\d) ACTION="(.*)"\ PARAMS="(.*)"/.match(line)
    if m
        m = [*m][1..-1]
        if(DEBUG)
            puts mkdelcmd(*m), mkaddcmd(*m), ""
        else
            sleep 0.1
            system mkdelcmd(*m)
            sleep 0.1
            system mkaddcmd(*m)
        end
    end
end

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users

Reply via email to