Home  ›  BLOG  ›  2010
Debugging the Umbraco Tag Cloud package
Donnerstag, 18. März 2010, Christoph Ertl

tag cloudDebugging the Umbraco Tag Cloud package would be great. But it’s not possible and not necessary.
However, one thing is really helpful when having problems with the counted nodes. Checking which nodes are counted.

Over time I’ve got repeated mails regarding having problems with counting the nodes. The problem often was a wrong or misunderstood result of the xpath expression. The “problem” with the RenderTags method is, that it just returns a result and you have no glue which nodes where counted.

A very easy way to check if your statements counts the nodes you want to count is the following.

After your code for the cloud

<xsl:value-of
 
select="TagCloud.Helper:RenderTags($currentPage/..., 'categories', '', 6)"

 
disable-output-escaping="yes"
/>

you place a for-each with the xpath statement you pass as first parameter to RenderTags.

<xsl:for-each select="$currentPage/...">
  <
xsl:value-of select="current()/@nodeName"/><br
/>
</
xsl:for-each
>

With this code you get a list of nodes which are calculated within the tag cloud calculator. There you should see where the problem is located.

ATTENTION: It is very important that you place this code at the same template where the tag cloud code is placed because the result depends on the node this template is executed on. It’s all about the hierarchy of your nodes!

Keyboard layout - again
Sonntag, 14. März 2010, Christoph Ertl

Fn

It seems that keyboard layouts are my new favorite topic. Well, it’s really annoying when working with notebooks and searching for keys or pressing some weird combinations because of different positions of keys.

A few days ago I had to work with a notebook with another strange keyboard layout. As I realized afterwards it’s not that unusual on notebooks.

The annoying point about the layout was the position of the Fn key. I’m used to open the Windows menu using the shortcut Strg-Esc (Ctrl-Esc).  On the notebook the most left key was the Fn key instead of the expected Ctrl key. Pressing the Fn key is usually not such a problem. But have a look at the Esc key.

Keyboard layout

So guess what. I shutted down the notebook more than once.

Autohotkey key remapping
Samstag, 06. Februar 2010, Christoph Ertl

Keyboard layoutIn my last post I used SharpKeys to remap the keyboard layout because of my intensive use of home and end keys. Great deal. Works really fine.
But this solution has one major drawback. At the office I use an external keyboard. In this case  I have the inverse of the annoying keyboard layout.

Changing the keyboard mapping to the current situation with SharpKeys is not a solution as the steps would be

  1. Start SharpKeys
  2. Enter/Remove mapping 1
  3. Enter/Remove mapping 2
  4. Enter/Remove mapping 3
  5. Enter/Remove mapping 4
  6. Write to registry
  7. Logout
  8. Login

It’s takes time, is stupid work and is error prone.

So I started searching again and found the tool called AutoHotkey. This tool supports anything around keystrokes, running macros and many more. And it also provides key remapping. The first intention was to forget the solution with SharpKeys and use AutoHotkey instead. But it’s not that simple.

Pro SharpKeys:

  • The settings are written to the registry.
  • The application doesn’t have to run to get the mapping work.

Pro AutoHotkey:

  • Easy to change settings.

The double remapping solution

The solution that' fits best for me is as follows:

  • Using SharpKeys to remap the keyboard to work best with the keyboard of the notebook. Let’s call it “Device settings”.
    This is the default setting of my device and no application is running to get this mapping done.
  • Using AutoHotkey to remap to original keys when using an external keyboard. Let’s call it “External settings”.
    This mode needs an application to run. With external power supply and a very small footprint this is really no problem.

The Steps to switch to External settings or back to Device settings are:

  1. Start/Stop ExternalKeyboard.ahk

Great, I love it. A little tricky but works really great.

I was really surprised how easy the key remapping was done with an AutoHotkey script. It’s that simple:

Home::PgUp
End::PgDn
PgUp::Home
PgDn::End

Remapping keys of keyboard to refine keyboard layout
Sonntag, 31. Jänner 2010, Christoph Ertl

Keyboard layout

There are a lot of things to consider when coming to a decision about which notebook to buy. Among the obvious facts like cpu power, memory, ports etc. there’s another important fact to consider.
The keyboard layout !!

Some manufacturers are playing around with the layout that you even cannot find the key you are looking for when searching with your eyes. Hitting it while typing is impossible.

What are most misplaced keys?

  • enter key (too small)
  • right shift key (too small or at the wrong position)
  • home, end keys (access via Fn-Key)

Depending on your computer usage you will not even recognize this fact. But if you are typing a lot you will despair on it.
And if you are writing source code, which is a per line writing, you will miss the home and end keys a lot. I can’t live without them.

So when searching for my new daily companion I had a look at the keyboard layout especially the size and position of the shift key and the position of the enter key. I couldn’t find that much business notebooks having the home and end keys as separate keys. We are talking about 12” subnotebooks. So what.

I corrected the keyboard layout with software. In my case home is “under” page up and end “under” page down. I just swapped this keys. Great. I really like it.

image

To change keys you can use the tool SharpKeys which is simple and great.

screenshot sharpkeys

Fujitsu Lifebook P3110 – Keyboard layout
Sonntag, 31. Jänner 2010, Christoph Ertl

Fujitsu Lifebook P3110 - Keyboard layout

http://ts.fujitsu.com/products/mobile/notebooks/lifebook_p3_series.html