解决putty上vim小键盘不好使的问题

原来在putty上用vi的时候,开NumLock时按小键盘上的数字键并不能输入数字,而是出现一个字母然后换行(实际上是命令模式上对应上下左右的键)。输入数字的时候,不能用小键盘总是很不舒服的。于是就去找解决办法。

其实最后的解决办法也很简单,在选项Terminal->Features里,找到Disable application keypad mode,选上就可以了。

4 thoughts on “解决putty上vim小键盘不好使的问题

  1. trooman

    哈哈,不好意思,神仙帮忙看下这段HASH函数代码是什么意思?如果改成PHP行吗?可不可以给我发邮件说,我的邮箱是trooman@21cn.com
    unsigned int hash_func(char *str, int len)
    {
    register unsigned int sum = 0;
    register unsigned int h = 0;
    register unsigned short *p = (unsigned short *)str;
    register unsigned short *s = (unsigned short *)str;
    while(p – s < len) { register unsigned short a = *(p++) * (p-s); sum += sum ^ a; h += a; } return ((sum << 16) | h) % MAX_PRIME_LESS_THAN_HASH_LEN; }

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.