The CBB

Discuss constructed languages, cultures, worlds, related sciences and much more!
It is currently Thu 24 Apr 2014, 18:36

All times are UTC + 1 hour




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Compose key for Windows
PostPosted: Thu 11 Apr 2013, 15:08 
greek
greek

Joined: Thu 19 Jul 2012, 20:26
Posts: 396
…or CKFW for short.

Links

The binaries
Configuration file based on X.org Compose file
Official bugtracker

Why?

Because both FreeCompose and AllChars assume that all sequences are two chars long. I'm used to the X.org compose sequences, so this limitation is a deal breaker.

Another reason is that now foreseeable future has a precise definition: a month and nine days.

What systems does it work on?

It should work on Windows 2000 and higher. It is supported on these systems.
Both IA-32 ("32-bit") and AMD64 ("64-bit") Windowses are supported, and native binaries (ckfw32.exe, resp. ckfw64.exe) are provided for these.

It has been tested on Windows 8, Windows Vista*, Windows XP* and Windows 2000.

It may or may not work on Windows NT 4.0 and below.

It's highly unlikely to work on Windows 95, 98 and Me. It'd be a miracle if it ran on Windows 3.11 and below.

It has also been tested on ReactOS, where it's buggy. Very likely to be a bug in the OS, though.

It doesn't work under Wine.

* courtesy of Milyamd

What about Linux? And BSDs?

Dude, you have X.org, which natively supports compose key.

What about Mac OS X?

I don't have nor care about this particular OS.

What about other *nixes? And non-*nixes?

See above.

How do I install it?

Extract the executable you want (see What systems does it work on?) to wherever you want.

How can I make it start whenever Windows starts?

The same way you do with any other program*. There are various methods with their own upsides and downsides. Refer to your favorite search engine for details.

* except there's no installer to do it automatically

How do I turn it off?

It adds an icon to the tray notification area. Click on it.

"Compose enabled" controls whether the compose key is active (if it's not, all keypresses are just passed unchanged), making it a good way to temporarily disable it.
"Exit", well… exits.

How do I configure it?

By changing the configuration file. By default, it's a file named ckfwrc in the current directory. If you want a different one, set the environment variable CKFWRC to the path of the file you want to use.

A quick explanation of the config file syntax:
Code:
# everything from a # to the end of line is a comment
# this is how you set the compose key
# the semicolons are quite important
# DO NOT prefix the numbers with "0x" or anything else!
: 14; # hexadecimal 14, decimal 20; happens to be caps lock
: A3; # right control, takes precedence because it's later in the config file
# see http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx for the list of possible codes
# no, the mouse buttons won't work

# a few sequences
# <>-, ""-, and ''-enclosed strings are equivalent
# <x> <y> is equivalent to <xy>
+ <a> <'> : e1; # á
# + "a'" : e1; # would be the same
+ "--" ' ' : ad; # soft hyphen
# the code after the colon is the Unicode code point of the character(s)
# yes, there can be more than one character
+ "ab" : 41 42 43 44 45;

# Unicode code points can be used on the left hand side, too:
+ 65 "e": 256; # Compose, e, e -> schwa


It says "Errors in the configuration detected, rerun with logger enabled to identify them", what should I do?

Run it (through the console or a shortcut) with the name of log file (which can be whatever you want) as an argument, like: ckfw32 ckfw.log
Now ckfw.log contains the execution log, which contains all the error messages CKFW detected when reading the configuration file. So you know what to fix.

This way of error reporting sucks, can't you just show a message box with all the errors?

Yeah… no. In some cases there can be enough errors to make the message box not fit on the screen. It'd suck even more.

It crashed!

Do you know what you've been doing when it crashed? If so, please rerun with the logger enabled (see It says "Errors in the configuration detected, rerun with logger enabled to identify them", what should I do?) and try to do the same things again. Crashed again? Great, now you can report the issue by filing a bug report on the official bugtracker. The report should contain both the instructions on how to reproduce it and the log. If you don't have one of these, you can still try and report it, but it'll be harder for me to fix.

The icon sucks.

I know. I'd appreciate it if someone made a better one.

What's the license?

3-clause BSD, except the source is closed. Tough luck.




So, uh, feedback is welcome.


Last edited by Fanael on Tue 28 Jan 2014, 20:08, edited 3 times in total.

Top
 Profile  
 
PostPosted: Fri 12 Apr 2013, 09:58 
metal
metal
User avatar

Joined: Mon 23 Aug 2010, 00:41
Posts: 1859
Location: Nose of the Sun
Either it works so good or nobody bothers to test it.


Top
 Profile  
 
PostPosted: Sat 13 Apr 2013, 08:09 
roman
roman
User avatar

Joined: Wed 11 Apr 2012, 13:58
Posts: 481
I get "cannot read the config file" eventhough ckfwrc.txt is in the same folder. Using winxp.


Top
 Profile  
 
PostPosted: Sat 13 Apr 2013, 14:27 
greek
greek

Joined: Thu 19 Jul 2012, 20:26
Posts: 396
I guess the reason is that it expects "ckfwrc", not "ckfwrc.txt". Perhaps I spend too much time using *nixes.

But nice to see somebody trying to run it.


Top
 Profile  
 
PostPosted: Sat 13 Apr 2013, 14:40 
roman
roman
User avatar

Joined: Wed 11 Apr 2012, 13:58
Posts: 481
It actually reads "ckfwrc", it's just that I added the extension in my post.


Top
 Profile  
 
PostPosted: Sat 13 Apr 2013, 15:07 
greek
greek

Joined: Thu 19 Jul 2012, 20:26
Posts: 396
Uh, works for me. I think that's because the file actually does have an extension, but the option to display file extensions is disabled in the control panel.

Anyway, I changed the code so that it now tries to load "ckfwrc.txt" if the one without extension cannot be opened. Please download again, the link is the same.


Top
 Profile  
 
PostPosted: Tue 16 Apr 2013, 18:39 
greek
greek

Joined: Thu 19 Jul 2012, 20:26
Posts: 396
Few minutes ago I released a new version that should reduce the memory consumption by about 25%.

I wonder, does anybody use it?


Top
 Profile  
 
PostPosted: Tue 16 Apr 2013, 19:45 
roman
roman
User avatar

Joined: Wed 11 Apr 2012, 13:58
Posts: 481
Fanael wrote:
Few minutes ago I released a new version that should reduce the memory consumption by about 25%.

I wonder, does anybody use it?

Im looking to use such sort of things when I get some time to conlang, but atm I even havent done the code combinations I need.


Top
 Profile  
 
PostPosted: Sun 05 May 2013, 19:06 
greek
greek

Joined: Thu 19 Jul 2012, 20:26
Posts: 396
A new version has been released!

No, wait.

28 (that is, twenty-eight) new versions have been released since the previous post.

Upgrading from all previous versions is recommended.

Bug fixes since then:
  • The program now properly reacts to a cancelled shutdown by not doing anything. Previously it'd close itself.
  • A bug that caused the program to ignore key presses when compose was pressed, a key was pressed, compose was released and the key was released (in this order) has been fixed.

Other significant changes:
  • It's possible to use hex numbers representing Unicode code points on the left hand side of the sequence, e.g.:
    Code:
    + 41 27 : c1; # + <a> <'> : c1;
  • There is an About dialog box, so it's possible to see what version you're running.
  • There is a restart function, that, uh, restarts. Useful when messing with the configuration.
  • Parse errors are now reported as errors in the log file. They used to be warnings.
  • The executable has now a proper version info, so it's possible to see what program version you have without running it (just see the file properties).


Top
 Profile  
 
PostPosted: Wed 08 May 2013, 19:35 
greek
greek

Joined: Thu 19 Jul 2012, 20:26
Posts: 396
Another new version, 51's its number.

Now it's not necessary anymore to mess with the logger in case of configuration errors. The program will display a dialog box asking if you want to see the list of errors, and upon answering "yes", it'll show an effing window with a read-only text editing control containing the same error messages you'd find in the log file.
Hopefully this change makes things a bit simpler.


Top
 Profile  
 
PostPosted: Wed 08 May 2013, 19:37 
moderator
moderator
User avatar

Joined: Thu 12 Aug 2010, 04:20
Posts: 3563
Location: 3:Å
Oops. I meant to answer your PM.

Yes, I would like to add it but this has been a busy week for me.
Don't let me forget to work on it if I haven't updated the thread in a few days.

_________________
Ikasmu ati'uki nai uraiur.
Cute comics about me!


Top
 Profile  
 
PostPosted: Wed 15 May 2013, 21:46 
moderator
moderator
User avatar

Joined: Thu 12 Aug 2010, 04:20
Posts: 3563
Location: 3:Å
Hmm. So I was going to add this to the 'how to' thread now but I don't really know what I'm supposed to link to. This thread? Is there a webpage I missed?

Also are there any simple instructions on how to install and use CKFW? The guide should be usable even by people with a very basic understanding of computers.

_________________
Ikasmu ati'uki nai uraiur.
Cute comics about me!


Top
 Profile  
 
PostPosted: Wed 15 May 2013, 22:29 
greek
greek

Joined: Thu 19 Jul 2012, 20:26
Posts: 396
Ossicone wrote:
This thread? Is there a webpage I missed?
Aye. There's no website yet.

Ossicone wrote:
Also are there any simple instructions on how to install and use CKFW? The guide should be usable even by people with a very basic understanding of computers.
Now that's a tough one. I never was good at writing such basic guides, and the program itself is hardly easy to use, just look how *nix-ish the way you configure it is. So what I wrote in the OP is all I have, as far as user manuals are concerned.

Nevertheless, I think I could try to write a computer-novice-friendly installation and usage guide. I do have to write a README after all. Unless something happens, I guess it'll take seven days at most.


Top
 Profile  
 
PostPosted: Sun 07 Jul 2013, 17:43 
greek
greek

Joined: Thu 19 Jul 2012, 20:26
Posts: 396
Fanael wrote:
Unless something happens, I guess it'll take seven days at most.
Well, life happened. And my memory happened too. Still no novice-friendly usage instructions.

But in meanwhile there were fifteen new versions. The current one is the version 66. As usual, upgrading is strongly recommended if you're running any older version.

The changes were mostly about fixing bugs. Sometimes shift or control or similar key appeared stuck. There was a window that couldn't be closed using the close button. The process priority was lost when restarting. All of these are fixed now.

I also reduced the memory usage by quite an amount. For a file that defines sequences for all Unicode characters from U+0000 to U+10FFFF the 64-bit version used to need almost 200 MB of memory. Now it needs about 45 MB. That's 22% of what it used to be.

As a side-effect of reducing the memory usage, the program now properly detects and reports sequences that would be inaccessible. Some configurations that appeared to work may break, but at least the errors will be reported properly. For example (the error message needs some tweaking, I think, can somebody help making a better one?):
Code:
: 14;
+ <abc> : 41;
+ <abd> : 42;
+ <ab> : 43;
Code:
In line 4: sequence would shadow or be shadowed by another one due to shared prefix.
In line 4:   note: sequence declared in line 2 shares prefix.
In line 4:   note: sequence declared in line 3 shares prefix.


Top
 Profile  
 
PostPosted: Tue 20 Aug 2013, 18:18 
greek
greek

Joined: Thu 19 Jul 2012, 20:26
Posts: 396
New version, again. This time it's version 88. Upgrading from all older versions is strongly recommended. The download link is still the same.

Changes
  • The error list window was not scrollable by accident. It is now.
  • The parser is much more picky with respect to UTF-8 correctness. Older version accepted any apostrophe-, quote- or pointy bracket-delimited byte soup. Now it requires valid UTF-8. It's not a breaking change, because UTF-8 was the only encoding that ever worked anyway.
  • The parser is faster, so CKFW starts quicker, especially if your configuration file is big.
  • It's possible to use both hex numbers and strings on both sides of a sequence. IOW, a declaration like "+ <ab> 63 : 41 42 <CDE>;" is now valid.
  • 64-bit version should be able to load configuration files bigger than 4 GB. Not that anybody needs that. Heck, I'm not even able to test whether it works.
  • Characters entered by using right Alt+another key used to be ignored and therefore unusable in sequences. Now they're treated the same as other characters, so they're usable.


Top
 Profile  
 
PostPosted: Mon 02 Sep 2013, 14:08 
roman
roman
User avatar

Joined: Wed 11 Apr 2012, 13:58
Posts: 481
For most of the time it works fine, but whenever I try to enter these combinations
Quote:
+ <9а> : <ɐ>;
+ <aа> : <ɑ>;
it only emits "DUM! You're wrong!" system sound. It starts wiðout ɡiviŋ ænɪ ɛɹɚz ðɔʊ.


Top
 Profile  
 
PostPosted: Mon 02 Sep 2013, 17:49 
greek
greek

Joined: Thu 19 Jul 2012, 20:26
Posts: 396
nmn wrote:
Quote:
+ <9а> : <ɐ>;
+ <aа> : <ɑ>;
The second ‹a›s on the left-hand side of both sequences are Cyrillic (U+0430), not Latin (U+0061). This won't work, unless you actually type the Cyrillic ‹a›s and not the Latin ones.

This is likely what you want:
Quote:
+ <9a> : <ɐ>;
+ <aa> : <ɑ>;


Top
 Profile  
 
PostPosted: Wed 27 Nov 2013, 18:29 
greek
greek

Joined: Thu 19 Jul 2012, 20:26
Posts: 396
New version. Upgrading from all older versions is, again, strongly recommended. The download link hasn't changed.

It fixes two bugs:
  • The menu and windows are not blurry anymore if using a non-default DPI setting.
  • If the right-hand side of a sequence contained consecutive repeated characters (e.g "abcdaaaaaefgh"), only one character from that group was send to programs. Now the behavior is correct, sending everything.


Top
 Profile  
 
PostPosted: Sun 05 Jan 2014, 19:39 
greek
greek

Joined: Thu 19 Jul 2012, 20:26
Posts: 396
Another new version. Upgrading from older versions is strongly recommended. The download link still stays the same.

It replaces the old code that attempted to detected which window has the keyboard focus with code that makes Windows tell CKFW whenever the keyboard focus changes. The new code is less buggy and detects the focus changes immediately instead of at the next keypress.


Top
 Profile  
 
PostPosted: Thu 09 Jan 2014, 19:36 
greek
greek

Joined: Thu 19 Jul 2012, 20:26
Posts: 396
New version: 101. Upgrading from older versions is strongly recommended, the download link is the same, yadda yadda yadda.

It fixes two bugs:
  • If you have one-character sequence triggers (like "+ <a> : <some text>;"), you don't have to be extra careful to release compose before pressing the sequence character anymore. The characters will be sent when you release compose, so Windows won't beep "error!" and the destination program will receive the characters.
  • AltGr kinda starts to work as compose key. Kinda, because IMO it's the wrong key, so I don't have much motivation to do a proper fix (but if somebody bugs me enough, that may change). Use AltGr as AltGr, and caps lock, one of controls or one of Windows keys as compose. AltGr and compose should complement, not override, each other.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Americanized by Maël Soucaze.